News for hackers. Stuff that matters.
Re:Elm 0.14 – Simpler Core, Better Tools by Dewie on Wednesday December 10, 2014 @01:13PM (#8730667)
"Result" is a pretty opaque name: any value or type can be called a "Result", really. "Either" at least hints to the fact that it is either-this-or-that.

"Either" is IMO a nice counterpart to tuple types: one is a generic sum, the other is a generic product. People could complain that a tuple of ints are less descriptive than just using a constructor with a more descriptive name - like "Pair" or "Coordinate", depending on its intended application.

Having a specialized type for error handling makes sense, though.

Re:Elm 0.14 – Simpler Core, Better Tools by bjz_ on Wednesday December 10, 2014 @02:19PM (#8731084)
It doesn't seem scalable though, because it only works for two types. It would be better to have some sort of structural union type (like Ceyleon).
Re:Elm 0.14 – Simpler Core, Better Tools by jmite on Wednesday December 10, 2014 @03:34PM (#8731508)
But it's defined as 'Result error value', which means you can just make 'error' a union type, and now you have multiple kinds of exceptions. When you specify an error type, you're basically specifying all the types of exceptions that the evaluation can raise.
Re:Elm 0.14 – Simpler Core, Better Tools by bjz_ on Wednesday December 10, 2014 @04:19PM (#8731770)
But it would be less descriptive from an API point of view. Which type is the return value? Of course we are now in the land of hypotheticals.