I was looking into what OCaml has in terms of web frameworks and came across Ocsigen. It provides js_of_ocaml which is an ocaml to javascript compiler (https://ocsigen.org/js_of_ocaml/). What’s the difference between the two? In what situations would one prefer one over the other?
Reasonml versus js_of_ocaml
sashang
#2
Don’t worry. I see that js_of_ocaml creates javascript from the ocaml bytecode. So one could write a Reason program, generate the Ocaml bytecode, then run js_of_ocaml to convert it to javascript.
thangngoc89
#3
So you’re comparing apples with oranges. The compiler is Bucklescript, it works on AST instead of bytecode like js_of_ocaml. You can learn more via this article
yawaramin
#4
This write-up by the BuckleScript creator may be helpful https://github.com/BuckleScript/bucklescript/blob/master/site/docsource/Differences-from-js_of_ocaml.adoc