* rereads * Janis, you are incredibly good at telling people that they're 
wrong.

Ah, I got caught up in the third paragraph about the native representation, 
and thought that those were Elm records, not JavaScript objects.

Also, the phrase "No type value has more than one value", for all of its 
bold redness, reads perilously close to "no type has more than one tag".

However, I think there's some value in pointing out the legitimacy of tags 
that have no arguments: under the proposal, union tags would still have 
either one argument or none, just not more than one. One of the more 
confusing parts of union types is that different tags can be functions of 
different arities or non-function values, depending on how they are 
defined. If we wanted to eliminate this confusion, we could require an 
arity of exactly one, and tags like Up and Down would need to be Up () and 
Down ().

But that's needlessly confusing, so limiting the number of tags to one 
seems more like a restriction than a simplification. Yes, you've found a 
way to make a strictly smaller language without diminishing expressive 
power. The same is true for requiring f x y = ... to be written as f = \ x 
y -> ... but no one is advocating for that.

So, I'm sorry I misunderstood your proposal and lectured on things you may 
well have known about. And for what it's worth, I've used two-argument 
constructors before, and I've advocated for records instead of positional 
arguments before. I think this is a place where we can allow some freedom 
to the programmer.

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to