An Elm Adventure

While looking for a new way to write the html/css/js for, a hackernews post led me to Elm (

Using elm thus far has advanced my functional programming know-how. The more interesting of the lessons learned are below.

The principle of "do one thing". Everything is a function, and every function's return value must be used in some way. To make a statment and ignore its return value is an error! Or rather, a function is a single statement, with a few allowed embelishments. The value of that statement is the return value of the function. Its a significant restriction that has changed how I think about code flow.

Union types in elm are something of an enum. Using a case statement on a variable of a union type means the compiler will ensure all possible types are handled.

Another result is elm seems to be a gateway into interest in ocaml (sparked by the ocaml js compiler).