4 ms·
It doesn't work like that in the case of Elm. You can implement the Elm architecture with React, Redux and Redux-saga, but that's just a poor imitation of the A
by mixedCase 9y ago
It doesn't work like that in the case of Elm. You can implement the Elm architecture with React, Redux and Redux-saga, but that's just a poor imitation of the API.
The point of Elm is not just the architecture, it's the language that allows you to write robust websites with little to no debugging necessary, all maintaining that robustness no matter how much you extend, tweak and refactor the codebase without having to be an expert in the language.
"Zero runtime exceptions" is no exaggeration, it's a reality in practice guaranteed by the compiler, meaning "after all it's compiled to js" makes no sense.
- kevmo314 9y agoYou're still arguing features of the language, not why the framework requires them.
- mixedCase 9y agoI already told you, go use React, Redux and Redux-saga, Elm the framework makes little sense on JavaScript where you cannot enforce many of the constraints the framework is designed around and you'd be doing yourself a disservice by forcing it in. In Elm you don't have exceptions, so the framework does not accomodate for them like, say, React does. It's also a pure language, so the separation of main state mutation and other side-effects without Elm the language is nothing more than convention, so you're not doing any better than Redux+Redux saga on that point. I'd suggest you try out Elm in a small project and see for yourself why it makes no sense to try to make it fit in the context of JavaScript.
- kevmo314 9y agoSo, essentially you're saying that Elm is not a framework, it's just a language. Okay, that works too.
- mixedCase 9y agoNope, that's not it either, since you can use Elm the language without importing Elm.Html ("Elm the framework"). It's simply that Elm the framework was designed without regard for the problems of other languages, and making full use of the features of Elm the language. On the other hand, Redux was inspired by Elm to replicate the same model in JavaScript while accounting for the deficiencies of that language. The closest you can get to Elm is probably that.