The difference isn’t merely representation. One is a variant taking a tuple of two ints, the other is a variant taking two ints. Both allow you to store two ints in a variant, but they’re not the same thing. This has come up before: Sum type constructor declaration subtlety (and documentation wanted!)
perry
4
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Sum type constructor declaration subtlety (and documentation wanted!) | 25 | 3204 | May 8, 2018 | |
| Records, tuples and variants subtyping | 6 | 2958 | September 29, 2020 | |
| How to represent tuples in AST? | 11 | 713 | February 18, 2024 | |
| Asterix in function signature reported by the compiler? | 2 | 811 | January 22, 2021 | |
| The type and nummber of inputs confused me | 4 | 1588 | October 3, 2017 |