Functional programming is getting some real traction (no kidding), so here is my two cents: Why you should give @elmlang a try, a thread
1/11
1/11
2/11
That brings us to the first pro of elm: it& #39;s easy to learn
https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ¤" title="Nerd-Gesicht" aria-label="Emoji: Nerd-Gesicht">
Why? Two reasons:
The first one is that it is designed to be simple. The language has been crafted to be an entry point to the scary functional programming world, without the need to understand what is a monad
3/11
Why? Two reasons:
The first one is that it is designed to be simple. The language has been crafted to be an entry point to the scary functional programming world, without the need to understand what is a monad
3/11
Second reason is the compiler (It& #39;s gonna come up a lot in this thread). The compiler has the most explicit errors you& #39;ll ever see in your life, period. Just take a peek:
4/11
4/11
The second pro, and in my opinion, the biggest, is the insane promise that your app will never error
https://abs.twimg.com/emoji/v2/... draggable="false" alt="â¨" title="Funken" aria-label="Emoji: Funken">It& #39;s a wild wild statement that can be hard to grasp at first, but to put it simply, if some code can fail (Like an API call), the compiler will force you to handle it
5/11
5/11
Now you may think that sounds like a bother, and you& #39;re right: it is. You have to handle all possible edge cases, always. The good news is, the compiler& #39;s got your back. You no longer have to ship something, hoping you thought of everything
https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="Schriftrolle" aria-label="Emoji: Schriftrolle">
6/11
6/11
The way elm is built, you can not have errors at runtime. Of course your API call can still time out, but the compiler will make sure you handle that case. Of course a user may enter invalid data, but the compiler will make sure you handle this case too
7/11
7/11
All this is possible thanks to the type inference capabilities of the compiler, and the extensive use of ADT, about which I wrote a thread right there
https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="Lächelndes Gesicht mit lächelnden Augen" aria-label="Emoji: Lächelndes Gesicht mit lächelnden Augen">: https://twitter.com/Euregan/status/1293539071231393794
8/11">https://twitter.com/Euregan/s...
8/11">https://twitter.com/Euregan/s...
These are, I think, the two main advantages of elm, but if you like numbers, do take a look at the benchmarks (With a pinch of salt, as always): Elm is amongst the lightest, fastest, quickest to build languages for the frontend
https://abs.twimg.com/emoji/v2/... draggable="false" alt="â˛ď¸" title="Tischuhr" aria-label="Emoji: Tischuhr">
9/11
9/11
10/11
Thanks for reading so far, and if you& #39;re still not convinced to try elm, please tell me why, so I can improve my future threads
https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="Grinsendes Gesicht mit lächelnden Augen" aria-label="Emoji: Grinsendes Gesicht mit lächelnden Augen">
11/11
11/11