Experimenting Elm

Experimenting Elm

Why Elm?

Today I've decided to try something new, something that haven't crossed my mind before (so the excitement level will be 100%). Then I started to google for Javascript alternatives, there are a couple of languages that caught my eyes, but I chose the one that is least familiar with me, which is Elm.

The experiment

Next stop, I headed to its official docs, tried out a few small app that they have there, not so sure about moving forward with Elm at this point. Then I watched one video from Richard Feldman, in there he told the story about his company trying out new stacks, and how they ended up happily with Elm after React. I got hooked after that.

I headed back to the official docs, installed Elm, then copied the example code from the docs to build "increase" and "decrease" button with the value popping up in the middle.

First impression: the syntax looks intimidating, lots of unfamiliar stuff.

Second impression: after looking and poking the code, trying to add one more button that can bump the current value of the number to 1000, it was exciting! That was the feeling that I wanted to seek.

Final thoughts

  1. All I did was about an hour and a half, including watching the video, Elm actually gives me the feeling of simplicity, and a smooth way of writing frontend code (without a lot of boiler plates got installed). After running elm init, only the elm.json (which is similar to package.json) and a /src got created, nothing else.

  2. Styling: I didn't know how to import a css file to an .elm file, and not even sure that's possible now, I googled a bit and ended up writing styles also in that main.elm file, which is not so bad because I only have only 4 buttons and a text there. Not sure if that's an optimal approach when there's a lot more stuff to be styled.

  3. Final final thought: I'd like to experiment more with Elm, to see how it goes.

#elm#first-post-1
 
Share this