3 ms·
Now that we have ReasonML, which has a more predictable and sustainable release cycle, and large support, as well as functional programming from OCaml and smoot
by hellofunk 8y ago
Now that we have ReasonML, which has a more predictable and sustainable release cycle, and large support, as well as functional programming from OCaml and smoother JS interop when that's desired, what does Elm still bring to the table? When Elm was originally developed, there wasn't a viable alternative for those who wanted good statically-typed FP in the browser, but it would seem now that new apps in this style of development have far more choices with generally fewer pain points.
- k_bx 8y ago- no runtime errors guaranteed (in the Elm code) - the ones you do get from your JS code – will be shown as console errors not involving Elm runtime in their stack trace - guaranteed support for time-traveling debugger and model serializability. How would one do this in OCaml if it allows mutable data (possibly cycle dependencies), side-effects and JS FFI? - better dead code elimination. All the code in Elm is pure Basically, OCaml brings almost nothing to the table out of things Elm provides because it tries to suit everybody.
- hellofunk 8y ago> guaranteed support for time-traveling debugger and model serializability. How would one do this in OCaml if it allows mutable data (possibly cycle dependencies) and JS FFI? The ReasonML debugger supports time-travelling as one of its features. The Bucklescript compiler that backs ReasonML provides dead-code elimination.
- k_bx 8y ago> The ReasonML debugger supports time-travelling as one of its features. Yes, but the question is: does it guarantee to be working or is it only "sort of" working? Can your view do side-effects? Can it call JS? If yes -- it will break soon. > The Bucklescript compiler that backs ReasonML provides dead-code elimination. I didn't say it doesn't. I said it will be way more poor than the one Elm has. I don't have the link, but Todo app in Elm weights less than the one made in React, that's how good it is.
- salimmadjd 8y agoInteresting since OP says time-traveling is not mature in ELM Tooling isn’t mature. IDE plugins, time travel “debugger” : they cannot compare yet with our usual Dev XP for TS
- k_bx 8y agoWell, it's one thing to not be mature yet (UI could definitely be improved, it's very minimalistic currently, but works ok for me), and another to not work in principle :)
- adgasf 8y agoI would take F# + Fable over Reason since Reason doesn't have computation expressions or do-notation
- a-saleh 8y agoI think you could replicate some of these with ocaml_ppx system (looks like macros over ast?) I.e. https://github.com/janestreet/ppx_let https://github.com/janestreet/ppx_let kinda looks like let! bindings in F#
- ernst_klim 8y agoOCaml 4.08 would have custom (let) expression. https://github.com/ocaml/ocaml/pull/1947 https://github.com/ocaml/ocaml/pull/1947
- frozenlettuce 8y agoAlso, Elm has terrible communication (yearly posts) and official docs
- razze 8y agoNot true unless you mean only blog posts. And to be fair it's the best documented platform for web development I have worked with. Have you looked at documentations of random npm packages lately? No, fun.
- quickthrower2 8y agoAbsolutely it has: 1. An official guide: https://guide.elm-lang.org/ https://guide.elm-lang.org/ - with a Hello World followed by all the basics. 2. Great docs https://elm-lang.org/docs https://elm-lang.org/docs with search function. Most package I see have all the functions described with examples etc. E.g. https://package.elm-lang.org/packages/elm/browser/latest/Browser https://package.elm-lang.org/packages/elm/browser/latest/Bro... 3. A subreddit and discourse chat where beginners can ask questions and get good answers.
- rs86 8y agoElm has managed effects and purity, and I had immense satisfaction in using it... Managed effects means that doing http requests and working with DOM events are managed from a runtime and from the point of view of the programmer they are just returning values that describe the effectful actions they want to perform, and any changes to programming state from those actions are apparently as function arguments... The language has its warts, but I would use it if it were not for the poor project management and support.