This was my third completed project with Elm. Elm is an ambitious language that makes bold claims: it aims for no runtime exceptions, is trying hard to be mainstream and common, and picks up syntax and ideas from languages like Haskell.
Elm looks a lot like Haskell, a purely functional language I was assigned to write for a short time in college. Haskell puzzled me and has fallen far short of “mainstream” - you might use Pandoc, a document converter written in Haskell, but for the most part it’s used by research laboratories or the rare cutting-edge usecase.
Click on the gray box to draw a point. Click a drawn point to delete it. Click undo & redo to move through history.
The initial learning curve for Elm felt steeper than ClojureScript, but once I grasped the syntax and got past the first slew of compiler errors, this project was an absolute delight. Writing the ClojureScript version gave me a taste of what it’d be like to implement in a natively immutable language. Writing Elm gave me that feeling but also the best experience with typechecking I’ve had. Especially with respect to Redux and Immutable, which are unfortunately blind spots for Flow, having instant type checking of values all the way through - from an event to the action to the model updater - was amazing.