Hacker News new | ask | show | jobs
by preommr 1890 days ago
Ok, exaggerations about elm's safety aside, there's the huge issue of it's readiness for production.

It's not just a fledgling project, it's a project that's being carried by one person for a very broad scope, and it's been going for a very long time now. Contrast that with something like vue, where Evan You has a fair amount of corporate sponsorship, has a much smaller scope (i.e. not an entire new language), big following, and has other frameworks to develop in tandem with (i.e. get inspired by react). Not to mention that it's very similar to other frameworks, so it's easy to pick up, so easy to hire for.

I would shitting bricks if I had 200k lines of code in a completely different language with a heavily different paradigm, that's not really battle tested.

6 comments

For what it's worth, Elm is extremely battle tested.

We have over 400K lines of Elm in production, and have been using it since 2015. We've been super happy with it, and have no interest in going back to JS or TS.

(To be totally honest, at this point I can't imagine even a hypothetical JS/TS framework that could bring enough benefits for us as a business to justify giving up Elm's compiler and package ecosystem. I'd be super impressed if someone managed that though!)

Is Evan still working for NoRedInk? It looks like he vanished sometime around May last year.
He is not, but he's still actively working on Elm. You can find his latest interview here: https://elm-radio.com/episode/open-source-funding
Oh nice, thanks for the context. NoRedInk published a big blog post about him joining a few years ago https://blog.noredink.com/post/136615783598/welcome-evan so I thought he'd get a "fond farewell" for leaving too
He's not. It wasn't exactly a happy separation. The company had some internal strife last year and I'm not sure if the CTO and the head of tech want to work together anymore
Head of tech here. We had COVID-induced layoffs, like many companies, not internal strife. Our CTO is one of my favorite coworkers I've ever had.

What a cruel thing to make up and then say.

The safety isn't an exaggeration, though I can understand it can be hard to believe when not experienced first hand just how hard it is to introduce bugs in elm. Like type safety eliminates one type of bugs, elm's stricter safety eliminates even more. When there is only one place in the whole code base that is allowed to have side effects, that removes lots of the bugs normally seen in frontend. Can't recall we ever having a runtime bug. And most logical bugs are also eliminated since they are harder to actually make.

It's ready for production. We've been using it for years without issues or bugs. It works as it is right now, and has done for years. It's not like it would stop working out of the blue.

> It's not like it would stop working out of the blue.

Unless the benevolent dictator pushes out a new Elm version that is not backward compatible.

And, if the process is the same it was a few years ago, it could happen next month and only a happy few know it. The development is done behind closed doors.

It happened to a project of mine, from version 0.17 to 0.18 IIRC. The choice was between letting the code slowly rot, rewriting a large part of it still in Elm but with the new paradigm, or switching to some stable JS framework. I had overall enjoyed working with Elm until that.

FWIW, no significant changes to the language are expected in the next couple of years.

Another side of this argument is that the rate of Elm ecosystem change is far more manageable than for JS.

A "stable JS framework" is an oxymoron, I'm afraid. My JS tools and NPM packages continuously change from under me, but somehow that's considered normal and not a problem.

I've just looked up a project I have with a mere 9 dependencies, and 7 of them have gone through multiple major version changes since the end of 2019. The other two have had minor releases. None are unchanged, even though all were already "stable" when I added them! Will the code still work if I update them? I don't know. Do I want to spend the time continuously tracking the changes to these dependencies, testing, making new releases of my project? Not really.

Perhaps I could continue deferring dependency updates, but that might make my job that much more painful when I have a legitimate reason to update (eg. for some new features I need) as half the package APIs will have changed beyond recognition by then.

I have so much less trouble with going back to Elm projects and picking up where I left off. That should be taken into consideration too.

> Unless the benevolent dictator pushes out a new Elm version that is not backward compatible.

That wouldn't break your build/deploy out of the blue, as you don't get force updated to the latest version.

And having worked on the 0.19 transition, it was in public preview for about 3/4 of a year and regularly discussed in the elm slack. When 0.19.1 came about, there were some more pre-release versions, where evan asked people to test and give feedback in slack. Can't speak for versions before that.

Same here. Still on 0.18, no upgrade path as 70% of my deps never upgraded. Awaiting rewrite in vue/react/etc
You can just vendor those dependencies, that's what I did, but I only had one that didn't update. And that one was trivial to fix.
a true believer I can tell. But you could easily say the same thing about a well architected typescript/react frontend app, its just that it has several orders of magnitude more experienced developers and billions in corporate sponsorship behind it. Which is significantly more important than any cool feature the hip esoteric language of the week may have.
> a true believer I can tell

Just fuck off with that kind of comment. I provided a well reasoned post, dismissing my views like that just because they don't align with yours is dishonest on your part and no way to have a discussion.

To answer your claims: No, I couldn't easily say the same about TS/react. In elm the language forces the architecture and safety. In react it can be whatever you want with leaks and unsafe modifications all over the place.

I feel like since TS's rise in popularity so many people who've never used a type system other than Typescript's believe that all static systems are equal and fail to appreciate the benefits of something like Elm. I personally haven't used it in a year or two for anything but it shifted my perspective as a developer.
Cussing the GP out for a light joke does not inspire confidence in you or your cause.
I don't have "a cause". I'm just providing insight, not trying to convert anyone to anything. So you're no better than GP in irrelevant accusations.
Dude, you told a fellow HN-er to fuck off at the drop of a hat. That’s not “giving insight”, that’s just vitriol.
That was mostly in response to your statement "it can be hard to believe when not experienced first hand just how hard it is to introduce bugs in elm"

Is just about the most ridiculous thing I ever heard (and certainly what a "true believer" would say even if you obviously and predictably disagree)

That a true believer will react angry to criticism is entirely self evident.

There are thousands of times more developers and companies using typescript over Elm, there is inherent value in this simple fact. No matter how much steam escapes your ears, its true.

I couldn't say the same thing for even well-architected TS apps. There are important escape hatches that TS gives that make it unreliable, as summarized in this article: https://incrementalelm.com/tips/typescript-blind-spots/

Refactoring code or updating dependencies is and feels a lot safer in Elm than in TS, and doesn't require asking for every npm package author to add TS type definitions.

I'd also argue that TS/JS have the esoteric/cool features. Elm is a very simple language, complete enough to be able to write most programs, but small enough to give you a lot of guarantees about how the code will behave.

| There are important escape hatches that TS gives that make it unreliable

This is one way to mitigate those escape hatches:

https://github.com/cyrilletuzi/typescript-strictly-typed

But in my experience, you had better be starting a new project. They aren't joking when they say laying it on an existing codebase is a nightmare.

Do you know if that somehow fixes https://github.com/microsoft/TypeScript/issues/8677 ? That's still the most annoying thing about typescript for me.
> you could easily say the same thing about a well architected typescript/react frontend app

Having built extensively in both Elm and TypeScript, I'd disagree, there's no comparison, even after importing Elm-ish concepts like discriminated unions, functional purity, decoders and immutability into my TypeScript approach. As others mention, TS leaves some type ambiguity.

> But you could easily say the same thing about a well architected typescript/react frontend app, ...

A badly-written Elm app can still be reliable, even if it ends up slow or sometimes acts funny. A badly written TS app is completely inscrutable.

You need to try elm. Elm is better despite not having everything you mentioned. I’m not a fanboy either. I just used elm for one project, but from that it’s already enough to know.
With regards to Elm being battle-tested, I'd argue that we've had that battle, and we won it.

Elm may not be a good fit for every project out there, like when you need tight integrations with specific JS projects, but it will work well for most projects.

At this point, I'd personally be more interested in hearing about cases where Elm was NOT a good fit (and why) rather than where it is.

I’ve batte-tested Elm on many projects at this point. It has its quirks, but it’s great. The language is so simple and its compilers so small that I’m not really afraid of the bus-factor. Worst case — I’d fork the compiler and apply the fixes I need.
The bus-factor of one is too high a risk for me unless I'm creating a throw-away project.
I'm pretty sure if your honest all you projects end up having this bus factor (check all your dependencies). If you really care to look, most projects are run by a small group of people.
I’m pretty sure you’d be wrong. I would never build a software product or service that uses a compiler written and maintained by a single person.
Interesting, why are compilers special in your POV? Why do they need regular maintenance and why don't they allow extension via some kind interfaces, thus allowing for less maintenance?
Elm is not something that needs regular security updates or something. It is super stable and has a relatively slow release cycle.

Even if the creator died or lost interest you would be still fine to use it. The community could still provide critical patches if their was a need. Feature development might slow down but if it is already offering everything you need that is not really an issue, no?

To add a little: the core features of the language are pretty well baked in at this point. Evan even said "If you like what you see now, that’s pretty much what Elm is going to be for a while."[0] The `eq` typeclass is I guess the missing feature[1] that stands out the most right now—in brief: don't allow equality check on functions, regexes, or JS objects at compile time.

[0] https://discourse.elm-lang.org/t/where-can-we-find-the-roadm... [1] https://package.elm-lang.org/packages/elm/core/latest/Basics...

> that's not really battle tested.

What is the criterion for battle tested?