by anmonteiro90 on 6/12/23, 4:28 PM with 54 comments
by pbiggar on 6/12/23, 5:58 PM
The challenge with ReScript is that the authors really were focusing on the JS ecosystem, and didn't care at all about OCaml. Their fusion with the ReasonML community didn't make a whole lot of sense. ReScript is a much better language now that it has split than it was then, if you look solely through the lens of a better JS.
But, as Elm and other compiled-to-JS languages have learned, Typescript has gotten good enough that other languages might not be sufficiently better than TS to attract enough interest to have a vibrant community. Doubly so since the JS-interop story isn't nearly as good in ReScript as it is in Typescript (though it's much much better than in Elm).
However, the aim of writing programs in OCaml which compile to nice JS and also native OCaml, and allowing both client and server to be written in OCaml, remains valid and interesting (and I would argue was held back by js_of_ocaml, the pre-existing way to do it). So I think there is something interesting here, though it isn't a ReScript competitor except tangentially.
Though I cannot really understand where ReasonML (a JS-like syntax for OCaml) fits into this - if the target is OCaml devs, than surely the ReasonML syntax stuff is not valuable anymore?
by tylerag on 6/12/23, 5:35 PM
https://ersin-akinci.medium.com/confused-about-rescript-resc...
by Weebs on 6/12/23, 5:39 PM
by k__ on 6/12/23, 10:29 PM
First, we had BuckleScript, that compiled OCaml to JavaScript to bring the OCaml type system to the Web.
Then we had Reason, that brought JS syntax to OCaml, so it's easier to grasp for JS devs.
Seemingly, some people didn't care about OCaml at all, and forked (I guess?) Reason to ReScript, that focused on JS compilation. They also added a few syntax changes in the process.
Now, the remaining (pre-fork) Reason people created a new(?) compiler that's an alternative to BuckleScript, and compiles OCaml and Reason to JS.
While I appreciate the effort, and think ReScript and Reason are superior to TypeScript, I totally understand why it didn't get as popular as this superiority implies.
by Mimmy on 6/12/23, 7:33 PM
Last discussion I could find was from 2018 [1].
by sp33der89 on 6/12/23, 5:37 PM
by fredrikholm on 6/12/23, 7:38 PM
OCaml is the most fun I've ever had writing code; seeing this after the whole Re* rebranding death spiral makes me hopeful that fullstack OCaml is still a possibility.
Thank you!
by asycocaml on 6/12/23, 10:59 PM
by idkjs on 6/13/23, 8:15 AM
by emmelaich on 6/13/23, 12:23 AM
Both of those came up before melange.re when searching for a hello world example.
by ekosz on 6/12/23, 5:17 PM
by danieloro515 on 6/13/23, 6:39 AM
by cassepipe on 6/12/23, 6:50 PM
by js_of_ocaml_3 on 6/12/23, 8:15 PM
Elm & PureScript I believe solved this problem.
by thangngoc89 on 6/12/23, 6:30 PM
by gdsdfe on 6/12/23, 6:45 PM
by colesantiago on 6/12/23, 5:32 PM