Note this is my personal thoughts, it does not reflect the team’s opinion.
The rescript compiler has been developed for almost 6 years, and I believe it has been the best amongst those alt-js compilers from the quality point of view, the second does not come close. But from the market point of view, it has a long way to go, so I think there are some thing we need improve on non tech side – community building.
My observation is that in the past few years, we have always been living in the shadow of OCaml community, it is actually not good for our growth (note we acknowledge the value that OCaml brings us and put it on the top of thanks list in the ReadME), I hope as a community we reach a consensus that we adopt ReScript is due to the value that ReScript brings by itself instead of reusing code on native side.
Why stay away from OCaml is actually a good thing? It brings us more stability, better Windows support and we can cultivate our own pragmatic culture. We can be more pragmatic and only adopt things which is useful to our platform.
Stability: For example, in the latest release, we removed the Marshal module, this module was never supported, any use of its API would cause a runtime crash, so in theory it should not break anything unless you had a crash before. But it does break some important packages, since it used a ppx which used Marshal, I have no idea why Marshal is needed.
Another example is that recently in OCaml community, they are shifting to a new macro lib (this happens every 6 years, camlp4 -> camlp5 -> ppx -> migrate-parsetree -> ppxlib), they reserved deriving
attribute name which is in conflict with our own built in attribute, do we need to change our names to be compatible?
The other constant complain is that our compiler is not using their latest bleeding edge version. But for the JS platform, does it really matter which minor version do you use? The difference is very small even between version from 4.02 and 4.12 from type system point of view. In the native world, the multiple thread support is coming, however, it does not exist in JS platform, do we really need to be compatible with such features? Our type system has been developed for many years, and you don’t want to change it for non obvious benefit.
Windows support: windows support is important. I don’t use windows in daily jobs, but still spend lots of time to make windows version work. Without windows support, the project won’t happen since my previous employer is a windows shop. However, most native tools in OCaml does not work on windows, if you happen to use a ppx in native toolchain, your ReScript libs probably won’t work on Windows. The sad thing is that this does happen, for example, Relude does not work on windows due to a use of ppx and it has an impact on all its dependencies.
Legacy issues: OCaml has been there for almost 30 years (counting caml-light), its design show its ages. To avoid breaking the compatibility with OCaml, ReScript does not have a good story in things like unicode support, this is embarrassing. The good news is that we decide to fix this despite of breaking compatibilities. This is just one issue, there are many other corner cases that deserve a clean up.
Note this is not a critique of OCaml, we appreciate that it enables us to build such a great alt-js compiler. The compiler will still be developed in OCaml, which is similar to Flow, Rust, Haxe, Opal etc.
I am thinking that it will be good that we as a community reach a consensus that ReScript is its own language so that we can move forward; the majority of ReScript users don’t need touch the OCaml toolchain. This is good for OCaml too, they have a very high quality compiler js_of_ocaml where they can focus on its improvement.
This is my confession and I would like to hear what you think.