3 ms·
Great answer, thank you so much for writing it. Given all of the con's, would you advise building an app from scratch with ReasonML? My main hesitation with st
by htormey 9y ago
Great answer, thank you so much for writing it. Given all of the con's, would you advise building an app from scratch with ReasonML?
My main hesitation with stuff like this & Clojure is that the learning curve for React Native + the JS ecosystem is already pretty steep. Do I want to add another layer into the mix? For me personally, it would have to come with a big return on investment to justify the cost. I feel it would have to offer more than just an incremental improvement over flow/typescript.
An example: I'm considering synching some time into learning RxJS & ReactiveSwift. My reasoning is that Reactive programming helps eliminate certain types of bugs and makes it much easier to chain events together in a complex app.
- lilactown 9y agoI think if you (or your team) are not already comfortable with React and the JS ecosystem, ReasonML probably isn't for you right now. It's still a very leaky abstraction, with multiple layers. Often errors can occur that in order to decipher require knowledge of both Reason/OCaml, BuckleScript (the compiler), React and JavaScript. Adding React Native is another layer. The ReasonML team are pretty amazing, though, and I do believe that they will rectify these problems quickly. A lot of effort is being put into documentation, error messages, tooling and design. The vision that they have for the project and the way they want people to be able to develop software is one that I admire and support. I'm putting in my own spare time to help them out, in the small ways I can. Right now, though, I would honestly recommend ClojureScript before Reason. I do believe the maturity of that ecosystem really has hit the point where the gains (REPL, data-driven development, reagent + reframe + figwheel >>> react + redux + webpack, and CHANNELS!) outweigh the costs (unfamiliar language, unfamiliar ecosystem, additional layer of abstraction). I've built some internal tools using Electron + CLJS and it was great. Haven't messed around with using it and React Native yet but I know that the renatal [1] project has come a long way over a short period of time. Your note about reactive programming is similar to the ReasonML vs CLJS vs JS conversation; reactive programming is great for certain things! But it comes at a cost; the abstraction makes certain problems harder and introduces it's own set of bugs (lifecycle bugs/crashes and memory leaks being the biggest one I've encountered with RxJS & RxJava), and can make your app code harder to reason about. Is it better than using callbacks or promises and imperative programming? Probably! Is it always? Nope! Are there other alternatives? Yes (CHANNELS!) TL;DR: Not worth it right now; give it 6 months :D [1] https://github.com/drapanjanas/re-natal https://github.com/drapanjanas/re-natal
- htormey 9y agoGreat answer! Lots of food for thought. I'd love to hear more about any problems you have encountered with RxJS & RxJava.