3 ms·
From a practical standpoint, what's the difference between js_of_ocaml?
by mercurial 10y ago
From a practical standpoint, what's the difference between js_of_ocaml?
- jaredly 10y agomuch more readable transpiled output, really nice (and getting nicer) FFI to javascript. but it doesn't interface with existing ocaml stuff as well (doesn't use `.cmo/.cma` so it needs to compile everything from source afaict)
- hongbo_zhang 10y agoit is generate more readable JS. and we have spent lots of time in polishing the FFI to make OCaml/JS interaction easier
- Drup 10y agoPeople gave you the part in favor of bucklescript, so I'll give you the other side of the story: bucklescript doesn't respect the OCaml memory model and runtime semantics, which makes it incompatible with some part of the ecosystem. Js_of_ocaml already has various features that bucklescript doesn't have: dynlink, support for concurrency libraries such as lwt and async, etc. It's also much more stable and battle-tested.
- hongbo_zhang 10y agoto be precise, Js_of_ocaml does not respect OCaml memory model either, think about float. But I think Js_of_ocaml is really great, BuckleScript and Js_of_ocaml have different use cases.