News for hackers. Stuff that matters.
Re:A small dive into, and rejection of, Elm by leshow on Tuesday November 08, 2016 @09:19AM (#12900371)
How would you enumerate over a union type? as far as I know there is no way to do that in Elm.

Can you show your one line map call youre talking about

Re:A small dive into, and rejection of, Elm by eskimobloood on Tuesday November 08, 2016 @09:53AM (#12900670)
I think he means to make a list of all member of the type and then iterate over it. Then you have the options method that get a union type and can render the correct output
Re:A small dive into, and rejection of, Elm by Touche on Tuesday November 08, 2016 @11:12AM (#12901380)
This is mentioned in the article. The author criticizes this because it means they have to keep the type and the list in sync.

I think this is a pretty pedantic reason to dismiss a language, personally.

Re:A small dive into, and rejection of, Elm by charlieflowers on Tuesday November 08, 2016 @12:57PM (#12902414)
Maybe to _dismiss_ a language. But it is a reasonable _criticism_ of the language. I hate those kinds of edge cases between strong and weak typing where the compiler knows something, but you have to express it again.

Granted, though, there aren't many languages that can handle that. As far as I can see, it requires compile-time code execution.

Re:A small dive into, and rejection of, Elm by darawk on Tuesday November 08, 2016 @01:15PM (#12902560)
IMO that's a pretty good criticism of a language that's supposed to be type-safe, but forces you to break its type safety because its lack of a feature.
Re:A small dive into, and rejection of, Elm by nicops on Tuesday November 08, 2016 @02:13PM (#12903062)
And it's not like any other language you can choose from for working in the browser is perfect.