My thoughts on Elm Lang
I should also note that I tried CoffeeScript four or five years ago and it made me swear off transpiled languages forever.
Elm was the language I was most interested in. It is a strongly typed, functional programming language with an error handling model I appreciate and a relatively novel approach to interop.
This week I read all of the docs, did some tutorials, and partially prototyped a solution to a feature I need to build for a project.
And my Elm use is complete. I will not be using it going forward.
There’s a lot to like about Elm in practice.
- It’s a decent functional language with a very, very small vocabulary.
- The syntax goes a long way to reduce clutter.
- The error handling is very modern and reminds me of other languages like Scala and Rust (all of which inherit from the same places).
- Data binding is intuitive once you understand other parts of the language.
- The tools are pretty good given how young they are.
There are some bad parts of Elm as it exist right now, however.
- What documentation exists is very incomplete, spread across the Internet, and there isn’t enough of it. After reading the docs, doing some tutorials, and reading some example applications, when I tried to write my own Elm code I felt like I was missing a lot of what I needed to know. Two examples: Figuring out how to work with the DOM in an existing application is downright painful. The let/in idiom, for people that don’t come from a language that has it (I didn’t), is really bizarre and badly needs more explanation and examples.
- The language itself isn’t bad but feels like it isn’t done. This conclusion could be the result of the lack of docs.
- This isn’t specific to Elm but…
I don’t care what people say, virtual DOM is a step backwards. Mixing HTML with your primary language today, is just as bad as it was during the ASP days. I got out of that business a long time ago and I’m not going back.
The problem with the virtual DOM as it pertains to Elm is that I couldn’t do much without it if I wanted dynamic updates.
I would not use Elm in my free time. It’s not for me. Which also means that I’m probably not going to consider it for my day job.
On to TypeScript