News for hackers. Stuff that matters.
Re:ReScript 8.4 by giantDinosaur on Monday December 14, 2020 @08:37PM (#25425994)
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 ?

Re:ReScript 8.4 by ezrast on Monday December 14, 2020 @09:52PM (#25426438)
ReasonML 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.

Re:ReScript 8.4 by d3nj4l on Tuesday December 15, 2020 @12:55AM (#25427442)
AFAIK there isn't a ReScript to Native compiler. The way to do server-side ReScript is to use Node.
Re:ReScript 8.4 by giantDinosaur on Tuesday December 15, 2020 @12:53AM (#25427435)
Thanks. That makes it very clear (to me), although definitely a harder sell to have to explain all these possibilities to others.
Re:ReScript 8.4 by scns on Tuesday December 15, 2020 @02:37AM (#25427933)
Paul Biggar of Darklang started a stdlibrary called tablecloth which offers the same API on frontend (Bucklescript/Reason) and backend (OCaml).
Re:ReScript 8.4 by rienbdj on Tuesday December 15, 2020 @02:48AM (#25427995)
Yet he too gave up on ocaml
Re:ReScript 8.4 by frou_dh on Tuesday December 15, 2020 @03:32AM (#25428234)
Yet another standard library for OCaml? You sure it wasn't a parody? :)

I can think of: TheActualStdlib, Base/Core_kernel/Core, Batteries, Containers, Belt, ...

Re:ReScript 8.4 by pbiggar on Tuesday December 15, 2020 @09:22AM (#25430539)
It has different goals from them: https://github.com/darklang/tablecloth