I don't think this would actually make the language simpler, for the
following reason:



*Flat is Better than Nested*
When you only allow one value per tag, you end up having records/tuples
nested inside of tagged-union types. Your nesting gets deeper and more
complex. So while it clearly makes Elm *smaller*, it doesn't make it
*simpler*.

This is also currently impossible in Elm, since Tuples are encoded as
tagged-unions. I'm a heavy proponent of encoding tuples as records instead,
but in either case, it's another consideration in this debate.

On top of that, the concerns with currrying constructors others have
brought up are very valid.


> There must be a way where we have functions for constructor AND labels for
> serialization


There clearly is! Haskell has this (it has a much more
automatic-serialization capabilities than Elm currently has built-in) so
it's clearly possible.



On Sun, Jan 15, 2017 at 11:59 AM, Maxime Dantec <he...@warry.fr> wrote:

> There must be a way where we have functions for constructor AND labels for
> serialization. I'm pretty sure I'm not going to find a solution, and it
> will not be on my laptop tomorrow anyway ;-) Just glad some people share my
> concerns.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elm-discuss+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to