r/programming • • Apr 09 '20

Why I'm leaving Elm

https://lukeplant.me.uk/blog/posts/why-im-leaving-elm/
562 Upvotes

268 comments sorted by

View all comments

271

u/stuckinmotion Apr 09 '20 edited Apr 11 '20

Phew, finally a reason to remove something off my "should check out one day" list, instead of constantly adding to it. Thanks OP πŸ‘

edit: everyone piling on to reply to suggest what I should check out instead, I feel like you didn't really get the sentiment behind my post πŸ˜…

0

u/[deleted] Apr 10 '20

[deleted] β€” view deleted comment

-23

u/[deleted] Apr 10 '20

That is pretty much how golang modules work too. Weirdly, nobody seems to have a problem with that there.

77

u/iopq Apr 10 '20

Because people already know Go is weirdly dictatorial

→ More replies (14)

43

u/LiteracyFanatic Apr 10 '20

F# has a JavaScript transpiler called Fable and a library called Elmish that uses the same basic principles but doesn't try to limit you from getting stuff done with existing technologies. You basically end up with a React application written using the Elm Architecture. Worth checking out if you want to learn from the ideas Elm has to offer in a language more suited for production.

8

u/[deleted] Apr 10 '20

Elmish is fundamentally flawed, though. One of the main features of the Elm architecture is subscriptions changing over time as the model changes. Elmish only subscribes once on initialization, and I don't think there's much leeway to fix it without breaking compatibility with many existing code.

0

u/[deleted] Apr 10 '20

[deleted] β€” view deleted comment

5

u/LiteracyFanatic Apr 10 '20

Last I checked, Microsoft doesn't own JavaScript which F# has fantastic interop with. It's crossplatform and entirely open source. Not sure what else you'd want from them.

→ More replies (7)

33

u/dinosaur_of_doom Apr 10 '20

It's perfectly great to check out. It has some brilliant ideas and is exceedingly well designed (for where it focuses). Yes - maybe you won't use it in production, but it's absolutely worth checking out and learning.

5

u/pavelpotocek Apr 11 '20

You can learn Purescript instead. It is basically a (much) more advanced Elm without any of the politics/restrictions. It's also much more intimidating to learn. If people think Elm has some great ideas - they barely scratched the surface of what's possible in functional languages.

18

u/PM_ME_UR_OBSIDIAN Apr 10 '20

Pick up TypeScript, Rust, and Coq. See you in a couple years. ;)

4

u/pcjftw Apr 11 '20

well already have TypeScript and Rust, so I guess I'm gonna have to learn Coq now πŸ˜‚

6

u/PM_ME_UR_OBSIDIAN Apr 11 '20

I did this over summer vacation a few years back and I had such a blast. Coq really pushes the "if it compiles, it's probably correct" principle to its limits, which people have used to write workbooks for learning it. In Software Foundations each chapter is a Coq file, every exercise is a hole in the file, and you're done with a chapter when there are no more holes in the file and it compiles. It's a really incredible way to learn because you get quick feedback.

3

u/pcjftw Apr 11 '20

nice!

personally I'm waiting for Idris2 to be fully baked, while I like the idea of Coq, other then a great LSD trip I don't really think I have a pressing need for a theorem proof assistant, I'm after something a little more "practical" for general programming !

7

u/BiggusDingus222 Apr 10 '20

why would anyone use Coq ? Wasn't it uses for mathematical proofs ?

0

u/[deleted] Apr 10 '20

[deleted] β€” view deleted comment

31

u/vytah Apr 10 '20

Typescript, Rust, and Coq in one project.

8

u/PM_ME_UR_OBSIDIAN Apr 10 '20

I mean... define "on the regular", but I consider all of them to be part of my basic toolbox, along with Scala.

Ralf Jung is working on formally specifying the semantics of the Rust programming language in Coq, and I'd bet he's toyed with TypeScript as well.

0

u/[deleted] Apr 10 '20

[deleted] β€” view deleted comment

1

u/MrJohz Apr 11 '20

I have some idea of the tech payscales in Germany, and those numbers sound unlikely to say the least, at least for entry-level jobs.

7

u/PM_ME_UR_OBSIDIAN Apr 10 '20

You can use it to write formally verified software. No one does this in industry... yet! But e.g. the CompCert compiler was partially verified in Coq, with the result that as far as anyone can tell it has no middle-end bugs.

The striking thing about our CompCert results is that the middle-end bugs we found in all other compilers are absent. As of early 2011, the under-development version of CompCert is the only compiler we have tested for which Csmith cannot find wrong-code errors. This is not for lack of trying: we have devoted about six CPU-years to the task. The apparent unbreakability of CompCert supports a strong argument that developing compiler optimizations within a proof framework, where safety checks are explicit and machine-checked, has tangible benefits for compiler users.

2

u/CarolusRexEtMartyr Apr 11 '20

It is definitely done in industry. Very rarified but certainly done.

→ More replies (8)

1

u/chrismamo1 Apr 11 '20

ReasonML does some pretty neat things

0

u/Shulamite Apr 10 '20

You still should. It’s at least the original (and the only good)redux.