Sum types: Typescript, Flow, Ceylon, Dotty
Product types: Not sure - afaik, Idris, Agda, and Lean's sum types associate to the right only
Conversation
I dunno, associative sums would be kind of hard to work with if they were positional only. Row polymorphism + union operator could work.
2
woops: s/sums/products/
2
Positional, as opposed to path navigation, like caaddr cdaddr silliness in Lisp?
1
Positional in terms of tuples vs records
1
Same as usual way with n-tuples? Pattern matching, _1, _2, etc.
1
I think the mistake is seeing `(,)` as an operator. in fact they are a whole bunch of hard-wired data constructors: `(,)`, `(,,)`, `(,,,)`…
2
That's my point, why can't they be the same, at least in userland.
1
1
Think you *might* be forced to add a subtyping relation at some stage to the type system in order to get it to work. Could be wrong though.
1
Or normalisation step to right- or left- associate everything
1
Replying to
Right. I think the latter could be confusing to users, but it would be interesting to experiment with it. 🤔

