4 ms·
I'm rather confused: what is ReasonML ? is ReasonML now ReScript, or is it still its own thing? A quick google suggests ReasonML is for targeting native platfor
by giantDinosaur 6y ago
I'm rather confused: what is ReasonML ? is ReasonML now ReScript, or is it still its own thing? A quick google suggests ReasonML is for targeting native platforms? But I used it for the web at one point?
Anyway, there was already a problem with like three different standard libraries (which had super annoying differences like swapping parameter orders, presumably in an attempt to be friendlier etc.) or something when I first messed around with ReasonML (Bucklescript? Whatever the Facebook one was in 2019? I dunno.) and I hope this isn't also increasing that problem ?
- ezrast 6y agoReasonML is merely an "alternate syntax" to OCaml, meaning it's a separate language that parses to the same AST. Traditionally it's been used along with Bucklescript, an OCaml-to-Javascript compiler developed by the same people, to do web work, but it's well-supported in the native OCaml compiler ecosystem as well. Now that ReScript has superseded ReasonML+Bucklescript, the only niche remaining for non-legacy ReasonML is native development work by folks who just don't like the normal OCaml syntax, or want to target both runtimes with the same code. Basically, the permutations are like this, with "ReScript (backend)" referring to the thing formerly known as BuckleScript: OCaml/native: What normal people think of when they hear "OCaml". ReasonML/native: Uncommon, but supported for folks who've bought into the Reason syntax. ReScript (frontend)/native: Nobody does this since ReScript is strictly worse than ReasonML when targeting native. I don't even know if it's possible. OCaml/ReScript (backend): Should be possible, but nobody does this. ReasonML/ReScript (backend): Sort-of-deprecated in favor of the new syntax, but still supported, and most pre-existing projects are probably still using this. ReScript (frontend)/ReScript (backend): Now collectively known as "ReScript" and the focus of the team going forward. New web projects are expected to use this.
- giantDinosaur 6y agoThanks. That makes it very clear (to me), although definitely a harder sell to have to explain all these possibilities to others.
- d3nj4l 6y agoAFAIK there isn't a ReScript to Native compiler. The way to do server-side ReScript is to use Node.
- scns 6y agoPaul Biggar of Darklang started a stdlibrary called tablecloth which offers the same API on frontend (Bucklescript/Reason) and backend (OCaml).
- rienbdj 6y agoYet he too gave up on ocaml
- frou_dh 6y agoYet another standard library for OCaml? You sure it wasn't a parody? :) I can think of: TheActualStdlib, Base/Core_kernel/Core, Batteries, Containers, Belt, ...
- pbiggar 6y agoIt has different goals from them: https://github.com/darklang/tablecloth https://github.com/darklang/tablecloth