6 ms·
Me too. I keep asking people about the business value of Elm vs JS. Why isn't Elm-lang wildly popular? (I think I know the answer, but even so I'm interested
by carapace 7y ago
Me too. I keep asking people about the business value of Elm vs JS. Why isn't Elm-lang wildly popular?
(I think I know the answer, but even so I'm interested in what other people think.)
- kolme 7y agoBecause it's a business risk. - It's very easy to find JS programmers. There's a _lot_ of them. But programmers proficient with pure functional programming languages are harder to come by. - JS is natively supported by browsers and it is pretty much guaranteed that the code you write is going to work for ever. Elm on the other side, who knows? It might lose steam and go into support mode, or drop support, or maybe they introduce breaking changes in a future version. JS is a much safer bet. - Writing Elm does not guarantee a good polished product. You can write bad software in good languages and vice-versa. That being said, it's only a risk. Maybe your team is more comfortable with Elm and they get more productive. Maybe the language design makes easier writing code with less defects. Maybe it actually gives you an edge. It is hard to say if Elm brings value to your business. It most likely depends on what kind of a business that is (web agency than cranks 3 visit-card websites a day? Or is it one developing a complex app?) In any case, managers get very nervous about languages that are not mainstream. And they do have good reasons.
- carapace 7y agoThanks for replying. > But programmers proficient with pure functional programming languages are harder to come by. I used to get a similar argument when pushing Python over Java, and my counterargument is the same: I wouldn't hire a JS programmer who was afraid or unwilling or unable to learn Elm. I would bet that any normal person smart enough to solve Sudoku problems could learn Elm, I wouldn't make that bet with JS/CSS/HTML. > It might lose steam and go into support mode, or drop support, or maybe they introduce breaking changes in a future version. JS is a much safer bet. But who is using just JS these days? Frameworks and transpiling are the order of the day, no? Same argument applies to them. And JS is a moving target too. As for "breaking changes", well, it is just version 0.19 so far. Once they hit 1.0 I would bet on Elm being more stable than JS+Whatever. Weigh this against zero front end bugs. That's a staggering (if hard-to-quantify) cost savings. > Writing Elm does not guarantee a good polished product. You can write bad software in good languages and vice-versa. Yeah but that's not an argument in favor or against any particular language, and in the specific case of JS vs Elm I think it's clear Elm wins. If your developers are truly crap then, yeah, Elm won't save them. But then you also have bigger problems than what tech stack to use, eh?
- wolco 7y agoIf you gave people the chance to learn you would find plenty of candidates. If you look for developers with elm experience you run into supply issues.
- 0_gravitas 7y agoIf you're open to remote hiring, I highly doubt it, I dont know much about elm (except that the people using it really like it) but the argument is one I've heard before with elixir. Hang out in the elixir slack or a FP discord for a day/week and you'll notice a massive amount of people taking about how much they like the language and wish there was somewhere hiring that used it. The people are definately willing.
- orange8 7y ago> I wouldn't hire a JS programmer who was afraid or unwilling or unable to learn Elm. Would you hire an Elm programmer who was afraid or unwilling to learn proper JS?
- busfahrer 7y agoAlso I want to throw in that learning a new paradigm (Elm) is something else entirely than going from one imperative language to another one.
- 0_gravitas 7y agoIn all fairness the functional paradigm isnt exactly all too hard to grasp (when it comes to what you need to be effective at least, you dont need to understand what a monad is, I still dont!). I started learning Clojure completely cold going through Exercism and it took me maybe 2 weeks of doing a problem a day (not much work at all) before I felt like I started to "get" FP. In fact, I would say it's even easier in a lot of cases because FP is a much "purer" skill set- any imperative language still uses functions, and arrays, and switch statements, and overloading. In FP, you have all of those familiar concepts (just presented in a possibly different way) but you dont need to worry about how classes work at all, or even loops in some cases!
- Hermitian909 7y agoKolme's comment is a very good reason, as someone who picked a non-standard frontend language I'll add my 2 cetns. I'm working on a project that went from javascript to reasonML when we felt the lack of a really strong type system was making managing the complexity of our app (which is unusually complicated) unmanageable. When I was evaluating Elm it was my favorite choice out of all the various strongly typed flavors of javascript, clean syntax, good abstractions, and very strong runtime guarantees. The thing that made us reject it, and will keep me from recommending it to others, was the change made, I believe in version 0.15 which, as I understand it, restricted FFIs so that only core maintainers could write them. I know several companies have frozen their version of Elm due to the change. Particularly when working with external packages written in JS, not having an escape hatch is a huge vulnerability. We've already hit one instance since using Reason where if we could not drop down into pure JS we would have had to either rewrite one of our main dependencies or at least hard-fork it and re-write substantial portions of the application, a multi-month (maybe multi-year) slowdown that would have killed the project. At this point I would not recommend Elm to anyone who is not willing to rewrite any pure javascript module they might want to use (this may fit the bill at some very large corporations).
- carapace 7y agoThat may have changed? https://guide.elm-lang.org/interop/ https://guide.elm-lang.org/interop/ > But what happens when you need to do something in JavaScript? Maybe there is a JavaScript library you absolutely need? Maybe you want to embed Elm in an existing JavaScript application? Etc. This chapter will outline all the available options: flags, ports, and custom elements. I haven't looked at it in depth yet.
- Latty 7y agoPorts have always existed. The change was to stop people writing "effect modules" which were the unsafe version of this where you could run arbitrary JS. The upside to this is that because ports work by message passing, it means that all the language's guarantees can be held even when using them, and packages can't do anything without you knowing about it. The downside is it is a lot more verbose and awkward. In my opinion, it also makes community contribution to the standard library a lot harder.
- 0_gravitas 7y agoAfter playing around with elixir and Phoenix, elm is the last point of the trident I've been meaning to touch. now if only I could find somewhere near me that uses any of those...
- xfer 7y agoHow does "use Elm" fixes the problems mentioned in the article? Elm is compiled to JS after all and has to be downloaded/parsed, which is what the article is talking about regarding cost.
- carapace 7y agoApparently it stacks up nicely. YMMV https://elm-lang.org/blog/blazing-fast-html-round-two https://elm-lang.org/blog/blazing-fast-html-round-two
- jatins 7y agoThose languages are also subjectively much harder to learn. I liked Elm and really tried to learn it on the side, but even after a week or so of spending time with it I had a hard time wrapping my head around how to simple DOM updates. Compared to that, React took me a day to get comfortable with. There is an argument to be made though, that behind that day there's potentially all those years of working with imperative languages which just isn't there for Elm.
- chownie 7y agoIn my situation we specifically avoided Elm due to the instability of their documentation. v0.18 docs were cleared off of their servers and replaced by v0.19, with unannounced breaking changes. The (B?)DFL pushes that even though it's not hit a 1.x version that it's production ready and stable, in our experience that isn't the case :(