I think the main source of frustration in these conversations about ReScript becoming “its own language” is that there’s a big gap between what comes to my mind when one hears that vs what reality shows, from a technical perspective. ReScript has done a ton of great work over last years, but it started as a fork of OCaml (actually two forks, also forked ninja), so it’s not a “leaky abstraction”, it is like one is still “swimming” in OCaml when using ReScript.
If the future goal is that ReScript becomes its own language, it would help to avoid frustrations on all sides (including core team) if the team defined a roadmap to remove features that were inherited by the project being a fork of OCaml, but are not needed for the long term goal of the project: becoming the best language for JavaScript developers.
Some quick examples: stop supporting pipe operator |>
, remove ppx-flags
from bsconfig, stop supporting ml
syntax, don’t use external
for bindings, etc. I am sure there are plenty more.
Otherwise there is still too much of OCaml being exposed to users through so many paths. Some of these paths like ppxs do not expose just some tiny OCaml functionality, it is the whole language + toolchain that is being exposed. I see all these exposures as a liability / weakness on the path to the ReScript future explained in this thread, as I understand it.
If ReScript history taught all of us anything is that every feature “inherited” from OCaml, but not being part of the main ReScript goal of supporting JavaScript users, will potentially become a source of problems on some future update, with the consequent frustration for both users (“why did my code break?”) and maintainers (“why do I have to do extra work to fix something that will not help at all to achieve the main project goal?”).
I understand planning and removing this functionality is a ton of work of course, especially ppxs, but not everything has to be fixed tomorrow. Just having a place where one can see a list of these OCaml-inherited features that are “intented to be unsupported at some point in the future” would be a huge improvement over current state of things, where these features are discouraged by core team members in random forum posts, or hidden from docs, and then seem to be removed in an improvised manner, with the consequent frustrated conversations due to misaligned expectations.