Wrapping Up Elm

You’ve now used Elm to solve a demanding user interface problem. You’ve also seen the concept of reactive programming, expressed in terms of signals. Reactive programming with functional languages will revolutionize the way we build user interfaces in the browser. The revolution is already started.

Strengths

Elm’s primary strengths are the type system and reactive concepts for dealing with events. The result eliminates two of the biggest JavaScript problems: the weak typing model and “callback hell.” The callback model is especially significant.

Also, Elm brings many of the advanced Haskell features to the browser. The type model—partially applied functions and currying—allows much more sophisticated programming, and allows the compiler to capture more errors. Several different Haskell alternatives have shown up here and there, but only Elm seems to be getting much traction.

Weaknesses

Elm may be hard for novices to learn. As with most Haskell-like implementations, it’s easy to get lost with the type conversions. You’re not just worrying about data types. Signals bring functional types into the mix, and the concepts are conceptually difficult.

Elm is also quite young. It will be some time before we know whether Elm will gather enough critical mass to break out beyond the emerging languages camp.

Final Thoughts

With Elm alone, you can tell a great deal about language evolution. We’re seeing a movement toward reactive concepts in the user interface, and we are seeing the Haskell type system have an increasingly profound impact on emerging languages.

When something is right, you can feel it. To me, a whole lot of Elm feels right. It may not be the final winner, but these concepts are helping the industry head in the right direction.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset