What are your favorite things about Elm?

Same for me, because of what @jxxcarlson said: joy of using a powerful type system as a tool for thinking about your problem, relaxation of fearless refactoring :grin:

4 Likes

The compiler is a friendly NPC

7 Likes

My favorite thing about elm is that I don’t have to worry when coding:

  • In other languages, I worry about the security of libraries I use. In elm, it’s impossible for them to maliciously send data somewhere if I don’t pass any Cmds or Html to the runtime.
  • In other languages, I worry about edge cases and error conditions. In elm, the compiler requires them to be handled explicitly, so I don’t get runtime exceptions.
  • In other languages, I worry about the order in which values in different components get updated. In elm, immutability and a single source of truth make it so that I don’t need to keep much state in my head.
6 Likes
  • packages from the package website actually are documented and mostly the quality feels higher then in js (if you get docs there at all or are able to find where)
3 Likes

<3

  • The language syntax and it’s core modules are pretty small and easy to learn
  • Uses beginner-friendly terms (in contrast to Monads, Applicatives, etc)
  • Compiler, elm-language-server, elm-format, etc. make for a smooth development experience
  • Compiled code is small, reliable and super fast
  • The community is great! It’s the first one I had direct interaction with (much because of lack of answers in Google), but it payed-off big time. I have learned so much just by checking out posts on Slack and Discourse from time to time
6 Likes

I will only add a point that has not been mentioned, because it is probably not very popular:

Contrary to popular posts on reddit or elsewhere I really like that the management of Elm as a language is a bit more like an aristocracy and not a pure democracy, where if enough people insist that they want mutation, for example, they will get it, regardless of a language’s goals. I think the feeling that popular requests and complaints should dictate the project’s path is not always justified and is even damaging to certain kinds of open source software. I think, as unpopular as this might sound, that public requests and complaints are properly treated as input to Elm, not as commands.
I tend to trust Elm’s leadership, based on Elm’s unique guarantees and how beautiful and reliable it is, though I don’t always personally agree with some of the decisions. I think it is good that Elm is managed the way it is, though there is always room for improvement.

18 Likes

So true!

Excellent programmers are rare. They stay on the top of the pyramid. If we go with democracy, ie., making decision by the majority of people, we’ll be lucky only when the decision happens to be the same as the one made by the top programmer.

3 Likes

I can deploy and go to sleep! Worth every penny

13 Likes
  1. Literal naming policy (as an aside I hope Elm will rename itself when it reaches 1.0.0 to “programming-language” :slight_smile: )
  2. API design in Elm is quite challenging in a rather fun puzzle like way. I think this is my favourite things for 2 reasons:
    • it makes designing packages quite enjoyable
    • more importantly it skews the balance of complexity towards package maintainers and away from application code. In languages that allow a lot more flexible API specification it’s a lot easier to be sloppy about these things, which tends to show in the ecosystem.
10 Likes

This is quickly becoming my favorite thread on the internet! Thank you so much for all your answers- I agree with all of them! :heart:

6 Likes

I think many people already mentioned no runtime exception and small-sized compiled js/html sizes. I personally like Elm a lot because:

  1. It’s simple enough for beginners, and powerful enough for advanced programmers
    Despite being a heavily functional language, Elm does not enforce its users/developers to understand many functional language terms such as monoid, monad, functor, etc (which I still don’t understand fully to this date) which might be a turnoff for beginners, and I believe people are already using these terms practically inside Elm features like Error, Maybe, Cmd, etc.
  2. The community is rich
    Guides like Beginning Elm are fantastic. Elm Discourse and Slack is also quite lively.
  3. Elm is designed with modularity in mind
    I think the approach Elm takes in designing the language is a lot like RISC-V
6 Likes

Being able to do Html, Css and Code all in the same language.

When I first saw Elm did not do Html with templates and {} I thought it would be terrible to use. Then I realised just how powerful it is to be able to structure how you generate the view with complete freedom and all of the power of FP at your disposal.

7 Likes

Same as basically what everybody already said.
Reformulating a few points with my own words:

  • Moving side effects at the boundaries of the system by default makes most of the codebase easy to reason about.
  • The ability to keep focused: the quality of the compiler messages really helps getting back to what I was doing before being interrupted, almost as if I wasn’t suffering from the context switching.

(Thanks for starting this thread!)

2 Likes

I can develop much more complex things with Elm than if I tried to do the same thing in, say, JS. Somehow (ADTs? types? TEA?) the ceiling for complexity is just so much higher; it’s very hard to get to the point of “welp, this is way over my head now, I’ve officially lost control, needs a rewrite.” :slight_smile:

7 Likes

This one is incredibly underrated imo. The documentation story for many of language’s packages is incredibly lacking in my experience.

I’m not really sure what it is that made the community put such effort into package docs, but its a huge benefit imo.

12 Likes

Refactoring! No language I’ve used comes close to how nice refactoring in Elm is. Having things just work after big changes still feels like magic after working in Elm for a few years.

5 Likes

Elm has an insanely great language design that’s minimal, and it doesn’t get more bloated with each new release. Recent updates have mostly been removing unnecessary features.

4 Likes

I just went to the website to download elm and the redesign is awesome! And I must say the “download” link on the home page was great :slight_smile:

3 Likes

Three cheers (and many more) for a totally awesome web site design!

3 Likes

A not often cited nicety of Elm that I appreciate in contrast to the C family of languages is the ability to specify type annotations on a separate line.

When I look at Typescript code from years ago for a side project I find the inline type annotations for function signatures in particular to be unwieldy whereas a similar, albeit refactored, type annotation in Elm requires less cognitive overhead.

It seems a trivial point until you understand just how important code readability and skim-ability is in building and maintaining software.

9 Likes