There have been approximately zero posts about elm the email client in the last ten years and probably close to a thousand about the front end frame work. Further more, the elm email client last had a stable release 15 years ago. And also this same “joke” has been made in every thread about elm and it is beyond tired.
Elm wants to get beginners into functiona programming, it did it for me very well. I've only used C-like languages before, tried Haskell but didn't grok it.
There are a lot of FP tools for JS, but there really is nothing is like being actually pure and typesafe.
I've never been able to modify or add features so fast to a grown project in my life. And with confidence that there will be no runtime errors.
> Would you use Elm again?
Definitely, so much as being willing to fight teeth and nails to be able to use it at work too. I just can't fathom the dread of JS/TS runtime errors anymore.
> Are there anythings you wish you knew before you started?
Do not try to build "components" in React fashion. It pops up every so often in r/elm etc. In my opinion, you can either slice and isolate you UI into components but smearing the state all over (React), or you isolate by state and smear the "components" across (Elm). It's orthogonal to each other and there is no in between.
I wish I had known Elm-UI or Tailwind.css. Now I have a typical mess of half-assed BEM, afraid to touch any line of it.
Also using SVG to draw the game, while it lets get started fast, isn't very performant. It shouldn't be hard to change.
I have almost no unit tests for the frontend part, because the type system covers so much. Then for the "larger" things that aren't really covered by types, they would be awkward as unit tests too, and I dislike integration tests, so I have some end-to-end tests for that.
Ports can be awkward, I wish there were there different kind of ports. Something to synchronously "get" a value, and something to do an async request/response.
Cyclic dependency errors (of modules) can be really irritating. I usually opted for sharing types in a submodule, or in the one global types module.
What resources you used to learn elm? I'm looking for a good book on 0.19 elm that is written to folks who can already program (probably even in functional style and just want to learn the specific tricks of elm).
Kudos. I really wanted to learn Elm to have a type safe way to write widgets that third parties would run on their sites. Seemed like Elm would have given me type safety + small bundle size.
Due to issues w/ websockets in Elm 0.19 I went with Angular, resulting bundle is 440k before gzip. Not great, not terrible...
I'm using MQTT over websockets, so I had to use ports anyway. IMHO, it would be nice to have websockets integrated, but wiring a bunch of ports is no big deal.
9 comments
[ 5.5 ms ] story [ 28.1 ms ] threadWould you use Elm again?
Are there anythings you wish you knew before you started?
Elm wants to get beginners into functiona programming, it did it for me very well. I've only used C-like languages before, tried Haskell but didn't grok it.
There are a lot of FP tools for JS, but there really is nothing is like being actually pure and typesafe.
I've never been able to modify or add features so fast to a grown project in my life. And with confidence that there will be no runtime errors.
> Would you use Elm again?
Definitely, so much as being willing to fight teeth and nails to be able to use it at work too. I just can't fathom the dread of JS/TS runtime errors anymore.
> Are there anythings you wish you knew before you started?
Do not try to build "components" in React fashion. It pops up every so often in r/elm etc. In my opinion, you can either slice and isolate you UI into components but smearing the state all over (React), or you isolate by state and smear the "components" across (Elm). It's orthogonal to each other and there is no in between.
I wish I had known Elm-UI or Tailwind.css. Now I have a typical mess of half-assed BEM, afraid to touch any line of it.
Also using SVG to draw the game, while it lets get started fast, isn't very performant. It shouldn't be hard to change.
I have almost no unit tests for the frontend part, because the type system covers so much. Then for the "larger" things that aren't really covered by types, they would be awkward as unit tests too, and I dislike integration tests, so I have some end-to-end tests for that.
Ports can be awkward, I wish there were there different kind of ports. Something to synchronously "get" a value, and something to do an async request/response.
Cyclic dependency errors (of modules) can be really irritating. I usually opted for sharing types in a submodule, or in the one global types module.
I just started getting my hands dirty, I used https://guide.elm-lang.org/ IIRC.
Also make sure to checkout the slack channel, especially #beginners, it's very helpful.
Due to issues w/ websockets in Elm 0.19 I went with Angular, resulting bundle is 440k before gzip. Not great, not terrible...