Three reasons to use Elm for the front-end


2 min read

What is Elm?

Elm is a fascinating small programming language for the front-end. Of course, the JavaScript ecosystem is dominating front-end development, with popular tools like React, Angular, Vue and others.

Elm is like a domain-specific language for creating web apps. Write Elm code which is then compiled into JavaScript code. Elm is a higher-level programming language, which enables you to be more productive.

No run-time errors

Elm makes run-time errors a distant memory. It's really hard to crash an Elm web app at run-time. Once it works, it works.


Elm promises higher productivity than JavaScript. The key point is that such higher productivity is obtained over the lifetime of a project. Elm is strongly typed and this means you need to write fewer tests, since types are already enforcing what types of values are allowed. For example, if an Elm function expects an integer argument, then it will not work with a string value. When writing Elm code, the compiler will help you avoid costly mistakes. Most of the times, the Elm compiler will give you helpful messages and hints to fix your code. Did I mention no run-time errors? That also means higher long-term productivity for your web apps.

Grow as a developer

Elm is a purely functional programming language, in the same family as Haskell. Impure functional languages include Scala and F#. Since Elm is small, you can learn it to try out pure functional programming, and it's going to be easier than Haskell. Maybe you will like it, maybe not. Still you will get a new experience, and this is going to help you grow as a developer.

There is no free lunch and there are tradeoffs for using Elm. Still, it's worth giving it a try, so give it a try.