6 ms·
Learning Elm by porting a medium-sized web frontend from React (2019)
- jrvarela56 3y agoI tried Elm in ~2018 and it was delightful. Ended up checking it out bc it was mentioned as 'prior art' in Redux's website. Didn't end up adopting bc everyone around me thought I was crazy to use something so niche. It's the kind of thing that even if you don't end up using, you come out with lessons that make you a better programmer. Some that I remember: - The compiler was fast, it made me aware that you could have an iterative workflow like most dynamic languages but driven by types - The language/framework constructs (views, updates, etc) made it clear what kind of functionality had to live where so it makes me aware to define roles/arch in React apps that are 'just components' - Error messages are just awesome, it was the clearest I had seen at that point and made me realize other languages just haven't paid enough attention to make them more usable
- ilikeorangutans 3y agoAgree on all points. It's delightful to compile your app and... it just works. No nulls. I still use it for personal projects where 8 can but Elm is showing its age. Newer JavaScript APIs are not well supported and ports, while I understand why they exist, can be painful to use. But I'd still recommend it. Way more fun than any other fronted framework library I've used and the functional nature was a fun challenge for me.
- hombre_fatal 3y agoI still use Elm for personal projects as well. It’s nice to come back to an old project and become immediately productive not just because of the type system but because all Elm apps work the same. Coming back to an old React app is usually a pain because everything changes between projects, even the state management architecture.
- _raul 3y agoExactly the same delightful experience here. Sadly it’s only become an even harder sell since then.
- cyberpunk 3y agoEvery single place I've worked that adopted it has like one or two elm repos left where no one has had the time to rewrite it into ts yet, and there's maybe one developer who still understands it. I've not seen anyone picking it for new dev in... a really long time. Shame, really.
- boxed 3y agoI use it at work. I tried to write Vue once and just hated it with a passion, so rewrote that part in Elm and was much happier.
- busfahrer 3y ago> It's the kind of thing that even if you don't end up using, you come out with lessons that make you a better programmer. Sort of a modern front-end developer's version of reading SICP even if you're not going to end up coding in Lisp, but because it makes you a better programmer, as you say. Interesting take!
- naltroc 3y agoelm is a lovely lang. it would be nice to have modern APIs on it. here's the project for new eyes: https://github.com/elm/core https://github.com/elm/core https://elm-lang.org/ https://elm-lang.org/
- datadeft 3y agoThe website tells the full story: https://elm-lang.org/ https://elm-lang.org/ © 2012-2021 Evan Czaplicki
- roebk 3y agoWhat story does that tell? React's would say 2022 - https://github.com/facebook/react/releases https://github.com/facebook/react/releases There's engineering effort happening behind the scenes on both projects, the releases have slowed, and big changes are coming to both Elm and React.
- zanellato19 3y agoElm seems pretty much dead to me, tbh, which has prevented me from even trying it for the last few years and I know I'm not the only one.
- throwaway2847 3y agoThere was a major loss of confidence and enthusiasm due to things like this. Very much not a project to build a business on https://dev.to/kspeakman/elm-019-broke-us--khn https://dev.to/kspeakman/elm-019-broke-us--khn
- boxed 3y agoHonestly it's better now that it's dead. The 0.18->0.19 transition was a big disaster. Imagine if we got one of those ever year for the last five years! I think that's what would have happened if Evan had continued to be able to produce new versions. Dead means it's super stable. Stable is good.
- pyrale 3y agoI believe the important part is not the date so much as the copyright. Basically, if you build on Elm, you're living inside Evan's personal project. There are upsides (Evan did a great job designing the language) and downsides (Evan's goal isn't being a maintainer, and he locked the ecosystem in such a way that many things can't be done without him).
- jcuenod 3y agoAnd for those who are interested, Evan (creator of Elm) gave a great Strange Loop '23 talk that hints at where he imagines things going, if he could figure out how to get the economics to work. https://www.youtube.com/watch?v=XZ3w_jec1v8 https://www.youtube.com/watch?v=XZ3w_jec1v8
- ddellacosta 3y agoI wouldn't bother with Elm. Among other things: https://www.reddit.com/r/programming/comments/fxvlow/why_im_leaving_elm/ https://www.reddit.com/r/programming/comments/fxvlow/why_im_... PureScript (https://www.purescript.org https://www.purescript.org) on the other hand is very nice.
- wryoak 3y agoPureScript made some ergonomically painful decisions (I value the logic behind their implementation of tuples but not having to use them in such a way), but I think the biggest point against it is how Haskell is moving into that space via JS and WASM compiler targets and bringing along its broader user base and library support
- ddellacosta 3y agoYeah the way tuples work in PS is kinda painful, but there are some affordances for tuple-like pattern matching that smooth over some of that pain. On the other hand, I feel like PureScript's records that utilize row polymorphism are such a game changer that it's hard for me not to get frustrated with Haskell records when I go back. And while I love where Haskell is going with WASM and JS support, I think it'll be a little while before that is viable for real-world projects.
- whosthatguy 3y ago> Haskell is moving into that space via JS and WASM compiler targets and bringing along its broader user base and library support This has been an initiative for longer than PureScript has existed. I wouldn't expect it to replace PureScript any time soon to be honest.
- josephcsible 3y agoFor anyone new to Elm, remember that as of version 0.19, unless your project is one of the Elm core team's pet projects, you'll have a severely restricted feature set available. See https://news.ycombinator.com/item?id=22821447 https://news.ycombinator.com/item?id=22821447, https://news.ycombinator.com/item?id=17842400 https://news.ycombinator.com/item?id=17842400, and https://news.ycombinator.com/item?id=16510267 https://news.ycombinator.com/item?id=16510267 for details.
- hombre_fatal 3y agoJeez, at some point you folks who don’t like Elm’s decisions have to leave the theater so the rest of us can enjoy the show. If you think a cult of personality is bad, you aren’t appreciating how much worse is, to the rest of us, the cult of anti-cheerleaders on every post that mentions Elm. For years now any time someone wants to read about Elm, they have to hear from the same few HNers who don’t even use it yet refuse to let it go. It’s like every time Dune plays in the movie theater, the same crowd comes in to explain how shit it is, how different it is from the book, in fact check out this ancient blog post about how bad it is, and there’s no way yall in the audience will enjoy it so don’t even try! The director sucks too, just look what he did! He fkin did that! It’s actually impossible to enjoy the movie once you know all the facts. And the guy who made the movie didn’t listen to my meticulous feedback and it hurt me cuz boy do I have opinions about how a Dune movie should be made, believe you me. Meanwhile we just want to watch the dang movie.
- matsemann 3y agoI'm quite curious what Elm triggers so in people, that they years later actively hunts down discussions about it to interject their negativity.
- esmevane 3y agoI think maybe you ought to think about inverting your stance on this, because it's not necessarily virtuous to imagine that everyone repeating the same warning, over and over again, is due to some mysterious, inexplicable negativity. And it's not great to imagine that they don't know what they're talking about, or that they're just trying to scare people off with senseless FUD. Or that they didn't actually run into the problems they say they did. Or that they don't know the root cause. Maybe a better question to be curious about is this: What can Elm do about the (self-evident in these comments, IMO) fact that a bunch of devs who really like it, feel like it's a bad choice? And, what SHOULD Elm do about that? If a bunch of people think it's a tool foreboding enough to warn others off of it, and in the same thread some of those same people are saying they really liked that tool and wish they didn't have to do that, what benefit are you really getting from just dismissing their feedback? Outspoken feedback is rare, just calling it negativity and paying it no mind rhymes a lot with the way Elm, writ large, has behaved. It's not indicative of a tool or ecosystem that wants to foster growth or continue development. That's part of the problem.
- ISV_Damocles 3y agoThe year in this link is very important. In the following year, the Elm team decided to not pay attention to the maxim "perfect is the enemy of good" and crippled their FFI story, making it impossible to actually use the language in production[1]. I would recommend to steer clear of a language that makes these sorts of decisions -- that certain features are off-limits to the regular developer because they can't be trusted to use them correctly -- because if you find yourself in a situation where you need that to solve your problem, you're trapped. I included Go in the set of languages I would recommend steering clear of for years, due to their decision to allow their own `map` type be a generic[2] type but no user-defined types could be[3], leading to ridiculously over-verbose codebases, but they have finally corrected course there. If you're looking for something kinda like Elm but not likely to break your own work in the future, I'd recommend checking out ReasonML[4] instead. [1]: https://lukeplant.me.uk/blog/posts/why-im-leaving-elm/ https://lukeplant.me.uk/blog/posts/why-im-leaving-elm/ [2]: https://go.dev/blog/maps https://go.dev/blog/maps [3]: https://go.dev/doc/faq#beginning_generics https://go.dev/doc/faq#beginning_generics [4]: https://reasonml.github.io/ https://reasonml.github.io/
- hombre_fatal 3y agoI have to agree that this is FUD. So, it’s impossible to use the language in production because FFI is async (ports)? lol, come on guys.
- ambrozk 3y agoIt's incredible that on just about every piece I've ever read about Elm since they made that decision, this has been the first, second, and third comment. Wanting to try Elm for myself, I disregarded this advice, and.... immediately ran into the exact same problem! I've never seen such a promising project so conclusively killed by pure developer pigheadedness. And, amazingly, they've never backed down at all. They don't seem to mind that they maimed themselves.
- pavlov 3y agoA purity pledge is very typical of cults. It's both a filter and an enforcement mechanism. This may not apply to Elm. But I imagine it can feel easier and more rewarding to manage a community that's more like a cult than a typical free-for-all open source project.
- boxed 3y agoI use Elm and am quite happy with it, despite the project being dead (and Evans horrible cult of personality). I am also keeping on eye on Gren as a replacement: https://gren-lang.org/ https://gren-lang.org/
- josephcsible 3y agoGren took the worst thing about Elm and made it even worse: https://news.ycombinator.com/item?id=36275171 https://news.ycombinator.com/item?id=36275171
- ordinaryradical 3y agoOof, why do this? What is the reasoning?
- boxed 3y agohttps://news.ycombinator.com/item?id=36278320 https://news.ycombinator.com/item?id=36278320 Gren is very open to contributions. This can radically change how this enforcement impacts users in practice. It's too early to say really.
- devX3 3y agoHaven't heard from this language since 2016 where a coworker tried this out but then gave up on it.
- Donberry 3y ago[dead]
- vendiddy 3y agoI'm interested in applying Elm principles but in a standard React and Typescript app. Anyone have experience doing this? It looks like redux has some inspiration from Elm, but I think the way effects are handled in Redux isn't as predictable as Elm.