Live data from Hacker News

Elm is Wrong

reasonablypolymorphic.com

181–190 of 218 posts

Re: Elm is Wrong

#181

Unfortunately this is an opinionated piece with foul language and it is a bit offensive. Sandy should take into account that Elm is created by one person pretty much (‎Evan Czaplicki) who created it in his PhD thesis and has been maintaining it since. So it's someones baby still, and they might be offended. It is a remarkable for one person to create a language, runtime, repl, debugger, compiler to another quirky lan…

This is no judgement on Elm as I have not used it.

I feel like RxJS and Cycle.js both make functional reactive programming quite accessible to JavaScript developers without the burdensome overhead of an entirely new language for the frontend.

Have you used these frameworks, and if so could you articulate why Elm would be a better alternative?

Re: Elm is Wrong

#182
It seems most of his issues stem from the language and the FFI, not necessarily the TEA style 'library' (which he claims is 'great' at the start). There is a Haskell -> JS compiler and an OCaml -> JS compiler, as well as Bucklescript, which is another OCaml -> JS compiler but actually outputs very normal looking and readable JS, probably be better to use those.

Consequently I had many of the same complaints, though not quite to the extent or wording he does, so I made my own TEA-like library on Bucklescript/OCaml and ported many of the Elm examples to it, most were basic copy/pastes with the most minor of syntactical differences (`with` instead of `|` and so forth, basically Elm->OCaml differences), I have it up (with code link) at http://overminddl1.com/bucklescript/ if anyone is curious. Not production worthy by any stretch but I do clean it up and add more and more to it over time, already can do near all that Elm's libraries can do, in addition to some of the community libraries.

Continuing on the article, he basically re-implemented OCaml's Witness style (done via OCaml's modules), it was fascinating watching someone build it in Elm I must admit.

He does focus too much on typeclasses, the witnesses he wrote is the way OCaml does it (although with a bit less syntax, and much more an upcoming update), which is not a typeclass form, but something similar.

An aside, where he mentions 'If you don’t want to read the essay, SYTC essentially says “hey, why don’t we pass around an object that describes the implementation of the contract that we care about, rather than having the compiler infer it for us?”. If you’re familiar with Scala, this is how they implement typeclasses in terms of implicit parameters. If you’re not, SYTC is equivalent to passing around a vtable whenever you want to invoke code on a dynamic target.', that is just what OCaml is doing in a soon-coming version with its implicit modules. Definitely looking forward to that, even if they are just fluff. They are basically like Scala's implicit parameters but with type lookup based on module definitions, still explicit, but significantly reduces the code required to be written.

Re: Elm is Wrong

#183
post #43

Earlier quoted context omitted.

I think it's valid criticism. There's a (excruciating) description of a use case, (valid) attempts to build a solution, and reaching the point where someone tells you "No, you can't have that because I don't want to" - whoever that may be - is understandably frustrating. Especially when the facility in question solves a real PITA of a problem. Now, the author was obviously venting, he even admits it. Nonetheless, the…

I don't think the response was as simple as "No, you can't have that because I don't want to". Reading the discussion about removal of this feature on Github there seems to be a few more points made that the author alludes to: https://github.com/elm-lang/elm-compiler/issues/985 Also, It's worth noting that Elm does have a BDFL. Evan makes the call and, as I'm sure a lot of python folks would agree, that setup means t…

Many languages with "BDFL"s have many contributors to core functionality. Elm does not seem to. For open source projects, that's pretty much a death sentence: although I appreciate Evan going off and solving hard problems with beautiful solutions, he can't do all the major work alone and expect to have a healthy, growing, open source project.

Re: Elm is Wrong

#185
post #93
post #91

Earlier quoted context omitted.

BTW, why lots of people think it's very wrong and immoral to criticize inanimate pieces of technology in rude and offensive language? Political correctness?

There are people on the other end of the screen who built the technology, and they have feelings :) Being nice is good.

someone posted this to HN the other day https://wiki.lesswrong.com/wiki/Crocker%27s_rules .. I thought it was quite good, it means sometimes articles like this, with their emotional language gives you information that is useful... IF you refuse to take offense to it.

Re: Elm is Wrong

#186

Earlier quoted context omitted.

I find that there are times where I get into a "Someone is wrong on the internet" situation, but still think it's worth commenting. This is one of those times. My goal is not to win the argument, but rather I hope I can show you a different way to look at the situation. To be fair, the only reason I wrote my original reply to you was because you asked why people would down vote you. Clearly 15 seconds is unreasonable…

So is it fair to say that it is possible for me to conclude "xyz is broken" based on a single paragraph? For example, if I read the Wikipedia article on Perl 6, the second paragraph says "While historically several interpreter and compiler implementations were being written, today only the Rakudo Perl implementation is in active development." So let me skip the part where I spend 2 weeks picking up a language! Let's…

"Elm is Wrong" is a good click-baity title. It's not out-right lying, but opinionated sure. It leads me to want to know in what way it's "Wrong", somehow broken fundamentals, stupid API, bad implementation, or what have you.

Given the response in this thread, I can only surmise it was a well chosen title for a blog post.

Re: Elm is Wrong

#187

Earlier quoted context omitted.

So is it fair to say that it is possible for me to conclude "xyz is broken" based on a single paragraph? For example, if I read the Wikipedia article on Perl 6, the second paragraph says "While historically several interpreter and compiler implementations were being written, today only the Rakudo Perl implementation is in active development." So let me skip the part where I spend 2 weeks picking up a language! Let's…

"Elm is Wrong" is a good click-baity title. It's not out-right lying, but opinionated sure. It leads me to want to know in what way it's "Wrong", somehow broken fundamentals, stupid API, bad implementation, or what have you. Given the response in this thread, I can only surmise it was a well chosen title for a blog post.

But HN has an explicit policy against clickbait titles, and usually edits them to be more descriptive.

Re: Elm is Wrong

#188

Unfortunately this is an opinionated piece with foul language and it is a bit offensive. Sandy should take into account that Elm is created by one person pretty much (‎Evan Czaplicki) who created it in his PhD thesis and has been maintaining it since. So it's someones baby still, and they might be offended. It is a remarkable for one person to create a language, runtime, repl, debugger, compiler to another quirky lan…

> Unfortunately this is an opinionated piece with foul language and it is a bit offensive.

Whenever you read "X is offensive", mentally replace it with "I find X offensive". The substitution emphasizes how little being offended ought to matter.

Your finding this piece offensive does not create an obligation on the part of anyone else. I am growing very tired of social critics attempting to turn the world into inoffensive mush. We need more articles of this kind.

> It is a remarkable for one person to create a language, runtime, repl, debugger, compiler to another quirky language

I agree that the effort is remarkable. The idea that the strength of the author's effort should somehow shield his work from criticism is antithetical to excellence. It's participation trophy culture. If we're to create great work, we have to understand the difference between good and bad work, and we can't do that if misplaced concern for someone's feelings stops our describing reality as it is.

Re: Elm is Wrong

#189
post #169

Earlier quoted context omitted.

Hi! I work at NoRedInk, the aforementioned company with 55,000 lines of Elm in production. We don't "copy-paste the same stuff over and over." That would suck. Why would we be excited about a language that made us do that? Our Elm code is about as DRY as our JS code was before, except the Elm code is way easier to maintain.

How do you compose update functions without writing the boilerplate let ... in for every Msg? How do you stop your main update function from growing endlessly as you add new Msgs? You need only look in the standard library for examples of boilerplate and not-DRY code. The map function is implemented separately for Lists, Arrays, etc. I really want to love Elm. But the more I wrote it the more I realised that the only…

It should be mentioned here that if map had the same implementation for both Array and List, map for arrays would probably be 10-20x slower than what it is today.

In that case, is it really boilerplate?

Re: Elm is Wrong

#190
post #169

Earlier quoted context omitted.

How do you compose update functions without writing the boilerplate let ... in for every Msg? How do you stop your main update function from growing endlessly as you add new Msgs? You need only look in the standard library for examples of boilerplate and not-DRY code. The map function is implemented separately for Lists, Arrays, etc. I really want to love Elm. But the more I wrote it the more I realised that the only…

It should be mentioned here that if map had the same implementation for both Array and List, map for arrays would probably be 10-20x slower than what it is today. In that case, is it really boilerplate?

Yeah, that would be an example of where even if that langue feature existed, using it would lead to a worse implementation. :(
Post reply on HN