Member-only story
Typeclasses in Elm
Introduction
I ran across Elm just a while ago for a college project. Each student had to pick a language, study it and present its main features.
I took Elm maily because it was one of the less famous options (everyone was fighting over big names like Go, Rust, Elixir, Kotlin, and I wanted an easy pick), and overall I was lucky finding something I ended up liking so much.
My first impression of Elm was very good; the fact that I was up and running my first functional web page in less than 5 minutes was very promising. I started growing some doubts after reading this article(from Reasonably Polymorphic, a blog by Sandy Maguire). It’s a (very salty) rant on Elm’s most controversial limit: the lack of typeclasses. I encourage you to read it before continuing.
Now, I didn’t come from a functional background, so I obviously couldn’t miss something I never used. However, the goal of my project was not advocating for Elm, but discussing over it: any possible controversy was gold for me.
While I wasn’t completely convinced by the author’s tone, I still sailed off with the idea that Elm was somehow limited; I was wrong, and it took me some time to realize it. This article wants to be a better version of Sandy Maguire’s Elm is Wrong, stripped out of all the senseless ranting that gets in the way of…