Re:Facebook Launches Flow, Static Type Checker for JavaScript
by lpw25 on Tuesday November 18, 2014 @06:51PM
(#8627199)
OCaml has excellent compile-to-JavaScript support. Facebook use this to compile their Hack type-checker for an in-browser IDE. I imagine they do something similar for Flow.
Re:Facebook Launches Flow, Static Type Checker for JavaScript
by avsm on Wednesday November 19, 2014 @02:12AM
(#8628676)
They do indeed use js_of_ocaml in the Flow test suite to compile the full Flow parser to JavaScript and then test that.
See the related discussion on packaging it in the OPAM pull request: https://github.com/ocaml/opam-repository/pull/3083
JavaScript has a weird ecosystem where it is extremely helpful to have all of your tools in the same language. browser-based IDEs, Node, portability, etc, and just one fewer runtime to juggle.
Same reasons why closure is awkward as a Java program.