Issue #32

When you open the first paragraph tells you Elm doesn't have runtime exceptions. What does it mean? If you search for the term, the first page of the results would consist of Java and explanations of what is and how to handle runtime exceptions. JavaScript is no stranger to them either. These exceptions can be prevented by the programmer if they were to check, for example, if the variable is defined. Every now and then our Sentry catches runtime errors, we add a test, create a patch, and deploy a new version. Well, in Elm it's different. It gives you guarantees it will never happen because the compiler catches it before you even deploy your code. This discussion briefly explains how Elm can achieve that and what's the benefit of not having any runtime exceptions. I loved this discussion also because it's another way to look at Elm (and functional programming) and compare it with JavaScript and React. And in my opinion it is a superior way of comparing these rather than feature wise.

If Elm can give you guarantees that runtime exceptions won't happen (or will be extremely rare), if you depend on ports or browser plugins, there's no such guarantees. How do you deal with those? There's a discussion happening right now on discourse.

Having just mentioned the comparison of Elm and React, I think I should stop including articles that do this. So I pinky promise that this is going to be the last one. In his comparison article, Anthony refers to the concept of convergent evolution which was a talk Evan gave a while ago. Evolution can lead different species in different points in time to similar results, e.g. similarly-structured eyes, wings, or other treats. Likewise completely independent teams can come to similar conclusions, which to some degree has happened with React and Elm.

While browsing Github recently I stumbled upon Sharry - a self-hosted file-sharing webapp written in Elm with the backend in Scala. It helps immensely when you can take a look at the code of a working app and learn from it. This is actually why I browse code on Github every now and then.

Another very neat project I found is called "liikennematto" which is a super simple game where you build roads. It is inspired by the mats/carpets with roads and houses drawn on it. I remember a friend had one of these in his room and we spent days building cities from Lego bricks and playing on these roads. And while the game might looks too simple for some, it's actually pretty cool to show and teach children about the traffic. In his blog post Matias explains the process behind the game.

And if you happen to be in or near Barcelona and looking for a job, the Book of Everyone is hiring for Elm and Elixir developer position.

Quote of the week

The summer is almost over and it starts to rain more often here in Estonia which reminded me of "Dandelion Wine" by Ray Bradbury. It is such a multi-dimensional book that one car read it over and over again and still uncover something new...

The first thing you learn in life is you're a fool. The last thing you learn in life is you're the same fool.
Show Comments