Ask HN: Why or why not should I use Elm instead of vanilla JS?
1–3 of 3 posts
Re: Ask HN: Why or why not should I use Elm instead of vanilla JS?
#2With Elm you will have a ridiculously stronger guarantee that what you write won't break at runtime. The type system and compiler also allows you to refactor with confidence.
Vanilla JS, unless you write exhaustive unit tests, gives you neither of these benefits.
Re: Ask HN: Why or why not should I use Elm instead of vanilla JS?
#3The other JavaScript is the Browser/DOM API. This is not syntax and semantics. It is approximately function calls to a standard library. Elm and ClojureScript and TypeScript and what have you, may wrap this in a library or a different API. But, at least for me, this does not solve my problem of being unfamiliar with the underlying abstractions. Even worse, once I scratched the surface to learn an abstraction, for example Service Worker, I was on Mozilla Developer Network looking at JavaScript. Without understanding JavaScript, I gave up "official professional" documentation for ClojureScript or Elm "amateur" documentation of the underlying JavaScript abstraction.
Finally, my specific conclusion about Elm was that it is not worth my effort to keep up with breaking changes. Blog post code samples and tutorials seem to go out of date every few months. Not just a little, but irreparably out of date. If Elm ever stabilizes around a spec or something like a spec, I may take another look. But for me, it feels like a case of perfection as the enemy of excellence.
Good luck.