Hacker News new | ask | show | jobs
by yakshaving_jgt 2495 days ago
I have about two years of professional experience working with ClojureScript, and about three years professional experience working with Elm.

There’s almost no comparison.

Elm compiles much more quickly.

Elm produces much more performant code.

Elm enables you to write software that works reliably much more quickly because type errors happen at compile time, rather than at runtime like in ClojureScript.

ClojureScript’s error messages are at times incomprehensible. Elm’s error messages are best in class.

Elm is far easier to learn than ClojureScript, and you’re right — you do need to know React if you’re writing a non-trivial ClojureScript application.

Elm is criticised for not allowing a synchronous IO escape hatch. This is a pretty bad criticism I think. Being able to guarantee where effects won’t happen is a pretty great thing. Any effects work and/or JS interop can be done with ports. Ports work just fine.

Elm is also criticised for denying the user a lot of “power features” like typeclasses. I find it mildly annoying sometimes that I don’t have everything I want, but I understand the trade-off. This is to make the language more accessible to your average JavaScript developer who has never tried anything from this family of languages. And I sure as hell don’t find it annoying enough to want to drop the type-checking compiler.