4 ms·
He's saying Reason = OCaml. OCaml can be compiled to to either a native executable, native bytecode, or JS. His comment may sound like a bit of an non-sequitur
by lilactown 9y ago
He's saying Reason = OCaml. OCaml can be compiled to to either a native executable, native bytecode, or JS.
His comment may sound like a bit of an non-sequitur, but really the confusion comes from: it's not a delineation between OCaml and Reason, but native packages vs. packages that are designed with JS interop in mind.
Some native packages can be compiled to JS (e.g. if they don't rely on C FFI), but many interesting ones cannot. js_of_ocaml's version of this story is much better than bucklescript's, but honestly I haven't explored it that much in either one.
So what you're saying - write pure OCaml/Reason code, with some JS interop, without relying on native OCaml/Reason packages - is certainly possible! And is probably the most common way of writing apps using the ReasonML syntax today.