261 points · by ak_111 · 3y ago · 335 comments
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.
I never really used it, but I see plenty of other languages that are perhaps too much driven by consensus rather than vision.
I don't particularly mind if a project holds their opinions sufficiently strongly that they mark the escape match big red letters with "BY USING THIS YOU ARE VOIDING YOUR WARRANTY, IF IT BREAKS YOU GET TO KEEP BOTH HALVES" and then tapping the sign any time somebody asks for support with using it, but it should still -exist-.
I would know. I was working on a large native code project that was killed by 0.19. It sucked for me that my project could not continue, but, I can't say that it has made much of a practical difference when it comes to making software applications. My project was called "elm-canvas" and it was about providing canvas support. Since 0.19, other people have found implementations of the HTML canvas element that do not rely on native code (Like Joakin's great 'elm-canvas' https://github.com/joakin/elm-canvas). For my own HTML canvas based software projects, I have been able to find my own non-native code implementations that work pretty well.
So, I think I faced a disproportionate amount of this problem, and I can't even say it has made much of a difference to my own productivity in Elm (and I have written a lot of Elm).
(There are comments upthread calling the Elm community "happy cult" because they said "no" so nicely!)
The complaints you hear about Elm are pretty much all of the "Evan said no" ilk.
What you don't hear is are actual bug reports, eh? People aren't kvetching about how their Elm apps broke, eh? That silence is deafening, once you listen for it. Elm works. It may be the Easy-Bake Oven of web dev, but the things it cooks are perfectly edible!
(Following that metaphor, most JS frameworks, etc. produce muffins with bits of broken glass in them.)
I completely agree with you, the way the Elm team handled it was not conducive to collaborate usage of their language, it was more like only they wanted to use it fully.
This is not true. You can argue that it was perhaps the downfall in terms of contributions and popularity. But you don't need native code for writing apps in Elm.
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
People seem to love Python syntax. ML syntax is just more regular, consistent, and typed. How is that worse?
Of course, if you started with ML syntax, you'd feel the same way learning a language with C syntax.
But if you're introducing a new language, it makes sense to target the language the most people are already familiar with. Maybe your language does really bring some real syntax improvements, but it's a silly hill to die on, because syntax just isn't very important.
If syntax changes are all your language brings to the table, your language really isn't worth learning. And if your language brings more important ideas to the table, then it would be a shame for people to never make it to those ideas because they got bored learning unimportant syntax ideas.
For instance, I'd say the piping is significantly better than the backwards reading of nested function calls you have to do in Python.
Data |> map |> filter |> group |> sum
Vs sum(group(map(a) for a in data if filter(a)))
But, I was also not indoctrinated by a computer science degree, which probably has a lot to do with it.
I always wonder this but I’ve always found Lisp syntax to be a lot more intimidating and less readable for whatever reason. I should give it a fair shot one of these days.
* Infix semicolons instead of paired delimiters to denote code blocks. These cause shift-reduce errors and make indentation unintuitive.
* Implicit currying turning what should be obvious argument count errors into type errors on unrelated lines.
* Implicit currying making parameter order overly significant. This drives languages to introduce infix pipe operators with unintuitive precedence and to bikeshed forward vs backward piping. This could all be done away with by having a dedicated partial application syntax.
* Postfix, of all things, for type constructors. Except for the ones that are, sigh, infix again.
* Inscrutable type signatures on higher-order functions, largely as a result of the above and of the convention of single-letter type variables.
Python gets away significant whitespace by reading like pseudo code and is fairly clean. It uses words rather than symbols.
C syntax provides visual structure using brackets.
It seems to keep things readable, you get the option of using symbols or significant whitespace for scope.
Functional languages have a tendency to do both. Lisp’s syntax is defined by replacing syntax with parentheses.
You basically get into a situation where you need to be able to read and comprehend math-like lines of code. Which doesn’t seem to mesh well with the structure of nature language.
It’s kind of like abstraction in programming. Some people kind of get it. Some people really get it. And other people need to consider a different career.
I think there are just too good programmers who don’t work well with functional programming to say it’s a problem with lack of familiarity. I think it could be a fundamental lack of talent.
"The Art of Doing Science and Engineering" has a few paragraphs about this. He points out that language has some intentional redundancy, because humans are unreliable and require it. But programming language designers are often skilled in logic, and prefer that to verbose "human" communication.
The language referenced is APL, but it made me think of functional languages which have a lot of custom infix operators, etc.
The tradeoff of this kind of grammar is that metaprogramming becomes harder because by the act of making some of the structure into special grammar, it becomes harder to metaprogram.
The preferred syntax is the one that incurs the least cognitive load. Which in turn depends on what they are already familiar with.
Natural languages inevitably build in a lot of redundancy that can seem irrational but that serves a very important purpose in decreasing confusion and increasing the rate of comprehension. The redundancy makes the language harder to describe, but it reduces cognitive load once you've learned it because it's easier to distinguish between different elements, even in less-than-ideal conditions.
I think this is where both Lisp and ML fall short and why they consistently lose to the more convoluted syntaxes: what seems like a flaw is actually an important feature that makes comprehension easier. Sure, you can go overboard (looking at you, Perl), but the irregularities present in C-style languages are valuable extra information channels that increase cognitive bandwidth.
I sure don't. I'll take explicitly-delimited blocks over having to slap a ruler to my screen to know what scope I'm in any day. It's a prime example of why form over function is a horrible tradeoff.
I use Python in spite of how much I hate its syntax (and myriad other aspects of it) because it's often the path of least resistance.
> ML syntax is just more regular, consistent, and typed.
My sample size is "Elm and Haskell", and of that sample size, my impression is the precise opposite. I encountered enough cases of whitespace that shouldn't have mattered but does anyway that it put me entirely off both languages.
Lisp? Tcl? Forth? Now those are regular and consistent (though admittedly rarely typed).
I think Lisp in the flavor of Common Lisp isn't so regular or consistent, but Scheme and Forth certainly are. I basically consider ML as a typed, indentation-sensitive Scheme, at least the way I think and program in them both.
Python's syntax is just yet another C-like syntax that goes back to ALGOL. People love it because it's familiar, it's not doing anything special.
Reason basically started with that premise that syntax is a problem to solve and we saw how successful it turns out.
When given a task of several things to do, that task is naturally given and expected in a list of procedures. Nothing needs to be explained here. People intuit this naturally. A list of things to do is grammar we all universally understand.
But ML syntax and FP?
Who composes all the procedures into a single run on sentence? And to top it all off it's some sort of functional grammar that's highly divergent from a list of procedures? That's essentially FP and ML.
This initial barrier is what prevents people from adopting FP.
People who say it's because C like syntax is the default syntax taught in schools are missing the point. C like syntax is MORE intuitive and THAT is why it is taught in schools.
That is not to say C like syntax is better then FP. I prefer FP, but I'd be lying to myself if I said it was naturally intuitive.
Realistically, most FP programmers program ML-like languages (Haskell and Elm included) in an imperative manner. It's an extremely straightforward translation, and in Haskell it's basically syntactically identical due to do notation.
It's also a bit in the realm of scientific/academic programming vs. real-world bulk programming where it's mostly just CRUD, mapping and business rules. It's all still important if that's how money is made, but as far as I can tell, most programming isn't really all that involved with 'quality languages' and more about feature output from a backlog. If you can do that for cheap with a fresh can of Python developers and some extra EC2 instances on AWS, that's an easy choice vs. someone who might want to do it in Lisp instead for example.
I tend towards pseudo-SML for scribbling things; once got in trouble for using "language specific constructs" like map() for university work. They weren't a fan of APL for adjacency matrix munging either, though that's how I went through that part of the course. In either case pseudocode is just ignoring the unpretty parts of any language, and it can hardly be said any language is more like pseudocode.
I'm still quite sad that Reason died. The syntax was much more comfortable and familiar than OCaml's while still delivering a ton of power. Have an optimizing compiler run on your JS was actually quite helpful. As a bonus you could have your backend running either Node or OCaml depending on your needs (ecosystem vs perf).
Was really unfortunate when the drama around Reason the language vs the Bucklescript compiler blew up and resulted in ReScript (a language that appealed to approximately no one in the existing user base).
> Sure, it was theoretically possible if you did a ton of work, but no one did that, because it would have been a huge amount of work (seriously, a lot).
I think I communicated unclearly. It sounds like you read my statement as "run the exact same code in node or OCaml" which I agree would have been very hard. I had a much simpler multi-service setup where I could share some business logic.
Basically I had two services with the code unique to them stored in different directories, /ocaml-server and /node-server respectively. Both called into a common /lib directory. /ocaml-server had some very hot loops in it, /node-server had more standard business-y code that hooked into various npm packages.
> 'Reason' just rebranded as ReScript
Between the breaking changes and the general change in development philosophy (not really caring about OCaml server side) I felt it was a completely different language. Certainly switching to the ReScript compiler for my project would have required nearly a complete rewrite.
It seems to be still alive (10.1 just released last week... i keep meaning to try it, but haven't gotten around to it yet...)
Typescript does make the devs _feel_ like it’s secure and that’s more important. Marketing works.
What?
Types are more important/useful for library code than business/presentation logic. Typescript lets you can hire devs who can’t read documentation or understand type systems write javascript to stitch together enough imports to make something work.
It’s also a relatively modest extension of decades of prior art so I think it might be more accurate to treat it as a formalization of that practice rather than implying it was foundational.
I think people preferring FP on the frontend are using ClojureScript, PureScript and ReasonML or ReScript now. Eg here's Dark's interesting story going to ReasonML via automatic translation: https://blog.darklang.com/philip2-an-elm-to-reasonml-compile...
(ClojureScript ecosystem was much bigger than Elm to start with in any case I think)
Elm was simply to risky given how quickly the maintainers fenced off native access.
Contrast with an elixir app of similar size that I also maintain. I fix on average 1-2 bugs per week, almost all of them are things that the elm compiler would have prevented like calling a function that was removed or renamed last month or not handling a case where a database request returned 0 records instead of 1.
Honestly though the biggest draw for me is the refactoring experience. For various reasons I had to do a major refactor of both code-bases. Not adding new features or anything, just restructuring the code and module layout to line up with the way the code actually functioned. Paying the tech debt essentially. I'd say both refactors were of roughly similar complexity, touching probably 75% of the files in each project.
The elm refactor took about 5 hours and worked as soon as I fixed all the compiler errors. I never had to fix a bug from that refactor - it just worked. And the code was way easier to understand after paying all that tech debt back.
The elixir refactor took 4 days, full time. 25ish hours. It also required me to write about 150 tests that weren't there before because the compiler wasn't able to point out code that would always fail at runtime. After deployment I had to fix a handful of bugs that still made it into production, despite how careful I was to not break anything.
Idk, being able to completely restructure the code without worrying about breaking anything really appeals to me for some reason.
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.
0 - https://github.com/gdotdesign/elm-github-install/issues/62#i... (see edit history for full impact)
Not that it excuses my behavior, but I have mentioned this elsewhere - e.g. https://old.reddit.com/r/haskell/comments/qc4bxd/outperformi... - but I also can't blame anyone for not knowing that.
Edit: I decided to edit the original comment to make my feelings about it clear for anyone else who comes across it in the future.
* 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.
This position in the Elm community is epitomized by this site:
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.
This was me a couple of years ago and I even gave it a fairly serious shot. It felt like the ecosystem buy-in was huge, and once I ran into something like a missing CSS rule it was a mess. And iirc all of that code would have been basically useless for portability in case I needed to switch.
Fortunately my tingly senses told me to stay away, and now I really feel like a dodged a bullet.
The main thing I consistently dislike with JS/TS is that there aren’t any easy ways to work with immutable data. I’m not the kind of person who needs full-on paradigm, I don’t mind getting dirty with an imperfect language, I just want the error-prone and common use cases to be decently supported.
The Elm Architecture Architecture ;)
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.
https://lukeplant.me.uk/blog/posts/why-im-leaving-elm/#forka...
It is going really well! Whenever I hear Elm can't be done, I am always a bit baffled. I am right here! Look at me! I am doing it!
All these people complaining about the lack of native scripts, yes it becomes a problem sometimes but it’s not a show stopper, there’s ports and web components.
I recommend Elm to any developer wanting to get into Functional Programming. Elm official docs itself will take you far.
I know multiple companies that use Elm and many people depend on them for their livelihood.
I would not recommend it due because it has never been a really open source project and only the core maintainers were allowed to write libraries that interfaced with JS apis without the need of ports.
Still, it baffles me how many people would chime in and feel compelled to comment regardless of the fact that hundreds of projects out there make money with Elm.
Elm was/is highly dependent on one person.
Hundreds? I think that's overshooting it.
But even with multiple people, I did get the impression it's not exactly a committee when it comes to what changes get merged.
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.
The previous huge project had basically zero bugs. The code was nice to work with, could trust things were working after a refactor without even clicking around in all interfaces. Could trust the typing and forced handling of all state to notify if you broke something. Of course, no escape hatches meant you had to program things the one correct way, no shortcuts possible.
While the react codebase I work in now is so brittle in comparison, and scary to make changes in.
I couldn't imagine having such a large project/codebase in react and need to do a huge refactor...
So what is HAPPENING with Elm, is people are productively using it.
Also, my own project, https://scripta.io. About 45kloc of code split between the app (lamdera/elm) and the MicroLaTex-to-HTML compiler (elm).
Have been working with Elm for five years and have been happy with both the experience and the results. E.g. radical refactors of core data structures are simply no big deal.
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.
It is an amazing language within a solid and productive ecosystem that in my opinion just feels good to use.
It's a shame not many company are betting on it despite it being rock solid for almost two decades.
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.
Are we talking about the same Elm? The 2019/2020 uproar in the Elm community was due to the Elm team making significant, restrictive changes against the will of the userbase: https://news.ycombinator.com/item?id=22821447
> That said, they are still under active development
I don't know who would consider Elm to be under active development, given that the last release was in 2019 and most of the repo hasn't been touched for 2 years or more: https://github.com/elm/compiler
- 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 :)
We'll see how it starts panning out this year or next.
See projects like Yew and Blazor.
TS/JS can do a lot these days, but threading is its achilles heel. Mechanisms like green threads and fast n-way dispatch for parallelization are basically still out of reach.
You can emulate some of this with WASM and worker pools, but it seems like you'd need a fair amount of boilerplate to actually make that work properly. And if you want to interface with native web APIs, you're stuck with the same limitations.
e.g. You can share memory with a web worker, but if you want to pass handles to resources around, you are extremely limited and it requires a custom approach for each particular API.
Especially now that Haskell is getting an official WASM backend.
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
I never understood why ReScript didn't get more love.
Was it because native had different requirements than JS?
Why couldn't they both play along and target WebAssembly?
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.
I heard he had a baby in recent years, is that what you meant? ;)
I think at some point in the last year he posted about his explorations with a new server-side language, maybe something to do with database drivers. Unfortunately I can’t find it.
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.
Eh, I'm a backend dev, and it isn't more understandable for me. setCount is a constant yet we're calling it as a function? And what the hell is useState?
I've written a fair bit of Elm on some toy projects and enjoyed it.
useState is one of those things that's a React specific concept, yes, but the rest of the code is very familiar to non-React frontend developers in general.
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?
For the record: yes, as much as it may sound bold or marketing-y, the statement is mostly true. You can have runtime errors if you write a bad regex though. After almost 3 years working full-time with Elm on a daily basis, I have not faced a single runtime error.
And by the way, this is coming from someone who moved away from Elm for the same reasons mentioned throughout this thread, so I'm definitely not an "Elm fan boy", but I do vouch for this programmer's statement.
I'm not saying Elm is bad, I was merely recounting a personal anecdote that for better or for worse prevented me from experiencing Elm.
Edit: When I see errors like this, I think it's gaining some interest/popularity and try to remember to come back later.