Hi, I’m the original inventor of React and I really like SML, however SML just didn’t have a few of the escape hatches or advanced features that were needed to implement a very usable, extensible, and type safe React interface or implementation, so I eventually explored the OCaml type system and I found that it has many of those missing links. One surprise was that when showing it to fellow UI developers, I would constantly be met with confused looks and after digging into people’s feedback, I found that most developers weren’t seeing the same thing that I was seeing on the screen so they weren’t able to see the ideas expressed in the code. The syntax was very commonly cited as a major point of friction. I don’t see anything wrong with OCaml’s syntax but my opinion alone doesn’t matter because a major goal of software is to collaborate with other people - who matter.
To fix the problem, a couple people from various parts of Facebook got together and started building/testing Reason together, and eventually we shipped what is likely the largest (in terms of machines (billions)) OCaml deployment ever via Reason React.
There’s still many pieces of OCaml beyond syntax that should be improved and we would like to continue fixing all the blockers to adoption that we can. Thankfully the rest of the OCaml community has the same goal and are doing great things at deeper parts of the toolchain and compiler. Our story started from the UI use case so our work and messaging so far has centered around it.
> The syntax was very commonly cited as a major point of friction. I don’t see anything wrong with OCaml’s syntax but my opinion alone doesn’t matter because a major goal of software is to collaborate with other people - who matter.
This is a perspective I wish was more prevalent in the programming community.
Yes! When first saw Reason I was horrified by the syntax (I really like the ML family syntax). But then I though about it, and here's my take now: if syntax is all we're giving up in order for OCaml to reach a far wider audience, then we're still coming out way ahead of what we had before.
I think that's the idea. Look at ELixir for example; they added Ruby syntax and macros onto Erlang and it's bringing tons of folks to the ecosystem. Sometime syou need to meet people where they are, if you want them to join your community.
It is becoming more prevalent when you think about Python PEP 8, gofmt, etc... No more personal preferences, syntax ears etc... One standard and tools to implement it. It makes working on other people code much easier.
I've tried picking up ocaml and reason a couple times, but found the build systems and standard library (and documentation) lacking. I say this in the spirit of constructive feedback. That said, reason's syntax improvements are welcome, and I'm excited to see it maturing!
Noted and thank you for the constructive feedback. Various people in the OCaml community are working on some of these and we might contribute to some of these missing pieces as well.
i'll second these remarks... also i'm on windows so the experience was not very good :( Seems weird that the goal is to make syntax to inspire the masses but then windows support is so pitiful
To fix the problem, a couple people from various parts of Facebook got together and started building/testing Reason together, and eventually we shipped what is likely the largest (in terms of machines (billions)) OCaml deployment ever via Reason React.
There’s still many pieces of OCaml beyond syntax that should be improved and we would like to continue fixing all the blockers to adoption that we can. Thankfully the rest of the OCaml community has the same goal and are doing great things at deeper parts of the toolchain and compiler. Our story started from the UI use case so our work and messaging so far has centered around it.