logoalt Hacker News

croteyesterday at 5:20 PM2 repliesview on HN

On top of the already-mentioned JS interop breakage, Elm 0.19 also dropped native Websocket support[0]. The API had issues (fair), so it was dropped rather than improving it due to wanting to do it perfectly (okay, I guess), buuut due to the JS interop restrictions this meant that 3rd-party experiments or alternatives were impossible (??), which meant that any use of Websockets was in practice now completely impossible! If I recall correctly something similar happened to other core libraries.

This "nobody is allowed to do this until Evan himself has made time to come up with a blessed solution" style of development left a lot of people quite disappointed. Elm was marketed quite heavily as the best thing since sliced bread and the future of front-end web development, but in reality it turned out to be just Evan's toy language which you could look at but weren't allowed to touch. Which is of course allowed, but it does rapidly kill any kind of community around it.

[0]: https://github.com/elm-lang/websocket


Replies

rupertlssmithyesterday at 10:36 PM

Elm was better without custom kernel modules and sync JS-interop.

It kept the Elm kernel small and portable. It forced the 3rd party package eco system to innovate and create things rather than just wrap existing Javscript libraries.

It has enable me to port the small kernel now to C++ for an Elm to native compiler.

Also, if you really wanted to bypass it and have your own kernel, that was always possible and not hard to do. Even in 0.18 custom effects modules could not be shared on the official package site.

hombre_fatalyesterday at 5:50 PM

This really overstates the problem and situation.

Synchronous interop was removed from Elm. That sucks for synchronous stuff and anything too trivial to be worth async interop.

But async interop is still available. Anything networked, like websockets, is a natural fit for async interop. i.e. a Send(Req) | Recv(Res) port.

It's fine to be mad that a "BDFL" decided on a different set of trade-offs than your preference, but that's what happened.

It's also a learning lesson for people who thought that a tiny, pre-v1.0 ecosystem that already had breaking changes would never break again especially in a way they disagree with. I think it's time to just accept the lesson.

show 2 replies