4 ms·
What are your thoughts on Elm? And why did you switch (if it was be choice not merely a change of jobs)?
by cies 5y ago
What are your thoughts on Elm?
And why did you switch (if it was be choice not merely a change of jobs)?
- matsemann 5y agoChange of jobs, yes :) I'd use elm again if given the opportunity, certainly. Enjoyed it very much. But I wouldn't evangelize my current company to switch, exactly. While it's not hard to learn elm, everyone here already knows react. And while elm leads to very robust code with little bugs and no runtime errors, it's at a cost of implementation speed, not everything is straight forward to write the elm way.
- cies 5y agoThanks! > everything is straight forward to write the elm way. Same could be said for React and Angular I guess; but mainstream drama is easily forgotten. :)
- matsemann 5y agoYes, but in React for instance, you could always do something "dirty" if you want. Like adding a class to some random parent element when a modal is showing from within deep down in the component tree, and remove on unmount, and also trigger a google analytics event. In elm, the GA event is a side effect, so it has to come from your update function, using a port out to JS. So it has to be triggered by the same conditions showing your modal. Sometimes that leads to that logic being duplicated. And the modal either the same to trigger some js code to set the class, or set a value on your main model somewhere and edit the render function of that specific element to take the new classname into account (so have to modify some other part of the code). Of course, it leads to maintainable code with little surprises. But at a cost of a stricter way to do it.
- girvo 5y agoI say this as someone who adores Elm and has used it in production twice: React et al. have escape hatches that Elm by design doesn’t.