elm / compiler

Compiler for Elm, a functional language for reliable webapps.
https://elm-lang.org/
BSD 3-Clause "New" or "Revised" License
7.48k stars 658 forks source link

Simplify type system #2309

Open pravdomil opened 10 months ago

pravdomil commented 10 months ago

Sum types - OR there is ONE way how to define: type

Product types - AND there are MANY ways: () (a, b) (a, b, c) { x: a, y: b } type A = A a b

Let's simplify it If I want OR I use type and |. If I want AND I use {}.

So remove tuples unit is {} variant has only one argument { model, Cmd.none } is the same as { a: model, b: Cmd.none }

github-actions[bot] commented 10 months ago

Thanks for reporting this! To set expectations:

Finally, please be patient with the core team. They are trying their best with limited resources.

mitchellwrosen commented 10 months ago

Sorry, 👎 to breaking changes from me.

bburdette commented 10 months ago

why would we do this and break practically every elm package.