This one is for you who have not heard of Elm before, or maybe you have heard the name mentioned somewhere but never gotten around to checking out what all this fuss is about.
What is Elm?
Elm is, according to https://elm-lang.org, a delightful language for reliable webapps.
It started out as Evan Czaplicki's thesis in 2012 called Elm: Concurrent FRP for Functional GUIs. The thesis examined using Functional Reactive Programming as a pattern for building GUIs, and the language Elm was built for this purpose. Already at that point Elm was a language made for being run in the browser. The thesis included a fully functional compiler for Elm, and an interactive editor that allowed you to write and run Elm online.
Elm also has static typing and type inference, a package manager that _enforces semantic versioning(!)_, a REPL and an ecosystem of community created packages. Perhaps one of the biggest selling-points of Elm is that it has "no runtime exceptions"! This might seem like an impossible feat, but reports tell us that it holds true (unless you specifically tell your code to crash)! We will go into more detail on these features in later articles.
Most Elm projects use elm-format.
This tool will take care of all code formatting for you so you don't have to worry about it at all.
One thing to note is that
elm-format formats the code according to the official Elm Style Guide and does not accept any configuration.
Because of this the code might not be formatted exactly the way you want it, but it has the added benefit that all Elm code in the ecosystem is formatted the same way.
Also, no more arguing with your team whether to use tabs or spaces or where to place curly braces!
So, that was a brief introduction to what Elm is. Hopefully, you are sitting there wondering how to get started writing some Elm code and trying it out for yourself.
Some useful resources are found in the links below. If you like to learn by reading, the official Elm guide and "Elm in Action", a book by Richard Feldman, are great. If you prefer to code along, "Elm Tutorial" by Sebastian Porto focuses on developing single-page web applications (note: it is currently not updated for Elm 0.19) and "Elm Arcade" (shameless plug, as this was made by me and my colleague Erik Wendel) serves as a starting point for learning Elm through making simple games.
If you want to just dive in and look at and try writing some Elm code, check out Ellie, an online Elm editor!
And of course, check back here every day until December 24! Each day we will have a new article about Elm. Also, visit our siblings: