However, I got distracted by a data science career and toolchain. Am in the process of starting my first SaaS as a solo founder and was looking at what languages to use and was surprised to see that Elm...seems dead? As an example I did a search on hackernews and it hardly got mentioned in the last year (both comments and posts!)
Am wondering if anyone can provide some more light on what happened to the language? Is it a safe bet? And what is a suitable good replacement for it?
As for a replacement, I'd look towards Haskell. At a language level, it looks really similar to Elm, and it's been having a lot of work done towards being more practical on the Web lately, e.g., GHC 9.6 getting a WASM backend merged.
Another factor for this is that Syntax Matters™. When Gleam (language on the Erland runtime, cousin of Elixir) started out, it had a Haskell-like syntax, but this was found to be a barrier for adoption, so when the creator changed it to be more C and Rust-like, the adoption rate picked up significantly [1]. In the same vein, perhaps Elm was just too esoteric for those coming from JS. I strongly believe the reason Rust became so popular is that it's an ML in C clothing, rather than being a pure ML like OCaml. With curly braces and all, it's more accessible and then people start learning about the more functional features like maps, folds, and so on.
Elm also had quite a rocky history with the BDFL not allowing other people to use the features the compiler maintainers could use, such as escape hatches, which are documented in other parts of HN. This article [2] is a particularly good overview of why some people left.
[0] https://www.youtube.com/watch?v=oYk8CKH7OhE
There's Gren https://gren-lang.org/ which is a fork of Elm. Gren has nodeJS and web storage a support, along with a package manager which can install from github (iirc). I'm eagerly watching the development of this project, hopefully it can provider value and grow into a strong alternative.
I loved working with Elm. It forced me to grow as a developer and appreciate all the benefits advantages that comes with a pure functional programming language. I truly hope Evan can start to win back the lost mindshare.
* 2017 - 2019
* 2021 - 2023
* 2023 - ?? (I'm starting a new job next month with Elm)
In my experience Elm isn't dead. But it is good enough. The lack of rapid changes, updates, etc are a feature, not a bug. I hated working in React TypeScript and what felt like constant updates to major libraries, including React and TS themselves.
React on the other hand, has a vastly larger ecosystem already and is designed to work well with 3rd party code.
Middle ground is using an Elm-like architecture within another framework. The keyword here is “TEA architecture” where TEA means The Elm Architecture, or also MVU (Model View Update)
Elm is excellent and has done a lot of good for the front end world through knock on effects. It is good fun to use. I have a few projects based on it open source. So I am not against Elm I just think it will be annoying if the goal os to ship fast.
I used Elm in production for many years and it is my choice for most production projects.
Exceptions are
- If you need to do a lot of number crunching and can't use Elm ports
- If you need to use WebGL
- If you depend on very specific JS libraries and can't use web components
Many of the controversial decisions do make sense if you dig deep enough, but... You need to dig enough.
I agree that there is an utter lack of transparency and communication from Evan and the core team.
Worse, there is no acknowledgment of the problem nor any attempt to try and truly involve the community in the future of the language.
Many enthusiastic people have left the community, leaving only those who can tolerate being told what is best for them.
Personally, I stopped contributing to the community in any way.
I started to write my own replacement language, http://squarepants.io/ which also tries to address some of Elm's weaknesses when scaling up (I was fortunate enough to use Elm on some large projects).
All the tools and other goodies are listed here https://discourse.purescript.org/t/recommended-tooling-for-p...
What I found particularly fresh for a Haskell-like language was the cookbook (https://github.com/jordanmartinez/purescript-cookbook) which contains lots of small-to-medium-size realistic example. They are to get you started and as a result do wonders for the learning experience.
My 2 cents. Don't use this place as a metric for whether or not something is successful or worth trying. 20 years ago this community would tell you not to use Ruby or Javascript, but today they'd call you an idiot for not using them.
what's interested me most recently are the various efforts to bring elm to the backend -
* choon keat's https://package.elm-lang.org/packages/choonkeat/elm-webapp/
* mario's https://lamdera.app/
* dillon's https://package.elm-lang.org/packages/dillonkearns/elm-pages...
What initially got my attention was that release which removed signals and abandoned FRP. I remember being struck by the idea of an emerging language that was stripping out major features. To me that suggested a strong vision. So I looked closer, and the suggestion was confirmed. My joy of Elm is as much about what it does not allow, as what it does.
So what is HAPPENING with Elm, is people are productively using it.
I've heard good things about purescript too.
I love using the SAFE stack in F#. You get the Elm architecture, and the same language front and back. You can even have shared code between the two. Fable remoting makes api calls as easy as an async function call. The back end has access to most of the .net eco system.
F# isn't the purist choice but it's a nice pragmatic functional first language.
But I hit a wall when I wanted to use some templating and communication modules written in Javascript. Working with things like protocol buffers and externally generated html through ports was very frustrating. As I kept working around Elm's limitations I began feeling this wasn't a language I could use part-time. I either needed to go "all in" or find something that made it easy for me use external Javascript. Looked at giving dillonkearns' Typescript api product a try but his e-commerce site crashed...
So now I'm trying out Yew, Rust and WebAssembly. I miss Elm's compiler but wasm_bindgen is way easier to use than Elm ports.
https://en.wikipedia.org/wiki/Elm_%28email_client%29?wprov=s...
But compared to an ecosystem that is truly dead, Elm has lively Slack and forum communities, and every StackOverflow question is answered such that I don’t even both trying to procrastinate on SO by helping beginners anymore—someone will have beaten me to offer help!
Right now, Elm’s Slack is one of my favorite places to hang out and chat on the internet. While it is a bit confusing why compiler work has slowed down so much, it’s not the best way to judge an ecosystem.
That said, they are still under active development with their own small communities achieving what they set out to do, and no more. No expansive rewrites or fancy new features.
Compare with Typescript, which always is “improving” because it’s trying to provide type inference around a loose Javascript model, so there’s always more complexity to be added.
- https://reasonml.github.io/en/
Or like others have suggested typescript and the usual libs and frameworks
Does very well on comparisons of performance and code size: https://medium.com/dailyjs/a-realworld-comparison-of-front-e...
Unfortunately or fortunately, beauty and utility emerge out of decentralised chaos not out of dictatorship, no matter how enlightened
This thread (mostly) by current Elm users mostly tracks emotions here on HN
Use the language you know best. Your tech stack is not the product:
https://hoho.com/posts/your-stack-is-not-the-product/
As for what happened to Elm? It reached a local maxima. Evan didn't want its purity to be compromised by external JS interop which cut it off from most of the open source ecosystem. If you never need to leave its confines, it's a wonderful place to be, but an engineer's job is to ship.
Has anyone who liked Elm tried Iced? Any thoughts?
I've been checking out various GUI libraries for Rust, but I don't have time to investigate them in depth--so I thought maybe someone might have already done the investigation for me :)
See projects like Yew and Blazor.
Yeah, for web apps it's a good choice if you want simple robust maintainable code.
I mean, for quick throwaway scripts I'd go with JS (as a Bash replacement), but for web apps, Elm strikes a really good balance of features.
The language is not dead, the community mostly lives on [Elm Slack](https://elm-lang.org/community/slack) as opposed to Reddit or StackOverflow.
for the open minded: building in elm will change the way you see software development. like the matrix red pill blue pill scene - you won’t be the same afterwards
And to kick things off, here's a blog post on "Why Derw?": https://derw.substack.com/p/why-derw-an-elm-like-language-th...
What happened with it? Not much. It just continues working and being useful for the people that use it.
Some folks have started working on a fork of the language, called gren.
Also, last year a package was published that added a different way of interoping with javascript (elm-taskport).
Appart from that, the language is pretty stable and solid in its niche. I don't see it going away in the next 10 years at least.
All new industries or genres or fads or anything really, go thru rapid growth of small players which get gobbled up into a couple giant monoliths as time goes on, which makes them really slow, which allows distruptive newcomers to arrive eventually (although not yet in this case).
So about five years ago I remember a study of the then new-ish functional front end project repos on Github and there were only 25x as many scala repos as elm and about 15x as many haskell repos as elm. So without knowing anything about the techs or even talking about the techs you know as rapid growth ends and consolidation begins that elm's going to disappear because its simply too small. Every 2018 elm project converting to scala before 2023 would just be a decimal place in scala or haskell numbers.
For another example see the auto industry. A century before "the big three" there were hundreds of small car companies. All gone!
Elm the language:
Generally rock solid for my purposes as a single dev making "home cooked" apps and games. There are very occasionally things where I'm held back by its inflexibility, but these are more than made up for by the positives. What elm has going for it is that it's totally type safe (not just mostly type safe like typescript) and that Evan and the community did a really good job designing primitive libraries for getting stuff done that have all the virtues you could wish for in other languages. Like great error messages, trying to make sure there's only one way to do something, etc.
Elm the community:
Extremely welcoming and helpful if like me you stick to Slack help and discussion channels. In Github comments threads and on forums like HN things can get spicy though. Elm is generally not as welcoming to folks looking to blaze their own path and build empires of their own as most of the JS ecosystem is. It's not that it never happens or can't happen; people do build their own large empires within Elm (I'm using Lamdera at the moment which is a fork of Elm making it work on the backend as well as frontend and it's definitely built by someone who had a vision related to Elm but which required drastic changes). It's just that that's less common and harder to do here than in other languages. I think there are a lot of folks like me though who are content to paint their masterpieces "within the lines" so to speak and even find comfort in the limitations. It's way easier if you are like me and find yourself doing like I said "home cooked" apps that you can cut scope on if you have to because of the language.
One final note which I've said before and I'll say again: I don't think the language is dead but rather "done". It works great for making a frontend app, and can continue to exist in this state through the year 2100 as far as I care. The creator has promised security updates and perhaps some non-foundational improvements down the line, and that's good enough for me. I'm much happier with that arrangement than with, say, React land where for all you know next year they're gonna release Hooks 2: Electric Boogaloo and you have to learn a bunch of new stuff and all the old libraries will have to update.
For me, it felt like a heavier cognitive load to do anything with Elm since it was another abstraction level away from the DOM. The quote "I know this is possible in Javascript, but we chose Elm and it makes it very hard" from the "Why I'm leaving Elm" article (https://lukeplant.me.uk/blog/posts/why-im-leaving-elm/#techn...) is something I never said to my boss but still resonates strongly as how I often felt internally frustrated when trying to work with Elm. Some of this might have been because I was very familiar with JavaScript and less familiar with something like Haskell, but I think it's fair to say that most people working on the front end web are likely the same.
For example look at the "simple" counter example... there's a ton going on that doesn't seem intuitive, and even having used Elm professionally I double take looking at lines like "update : Msg -> Model -> Model" or "main = Browser.sandbox { init = init, update = update, view = view }": https://guide.elm-lang.org/architecture/buttons.html
The equivalent React simple counter example (https://reactjs.org/docs/hooks-intro.html) is much more understandable IMO/. Even if you haven't ever used React before, it looks much more like typical HTML and JavaScript. React has plenty of gotchas and is far from perfect, but in terms of getting junior web developers making their first pull requests in our codebases React took way less effort and learning.
Elm isn't dead, it has some dedicated FP fans as users and works fine. It is niche though, and I don't expect that to change.
--
As a side note, it always irked me to see the word "I" in either an Elm error message or the official documentation. In errors it felt overly friendly or personified rather than giving me straight technical info, and in documentation it felt concerning that a single person's opinion might have an overly strong influence and that person might not listen to the broader community on some key issue and prevent progress.
https://discourse.elm-lang.org/t/request-elm-0-19-2-any-upda...
It has been fairly quiet as far as development is going. But I do know there are things in the works for another big update.
- The compiler allowlist in Elm did not go down well
- Fable (F#) is a great alternative to Elm
- F# is a better server language than Elm on Node.js IMO so is a great full-stack pick
It was possible to build some elegant projects with Elm if you accepted the limitations, but the messy reality of web apps doesn’t fit within its pure model of the world.
http://www.instinct.org/elm/#download
Oh, you weren't talking about the email client. :)
Now I don't believe in miracles, the Easter bunny or code that has no way of failing, but I said fine, JS can be terrible (it was even more so I'm those days), so I googled the project webpage, opened it and WHAM, blank page, with only "Error: database connection not available" or something like that written on it. Let me tell you, I laughed so hard as I was closing the tab! And while I'm sure it was just extremely bad luck, I never looked at the project again. They had their chance, and maybe don't make bold promises you can't keep?