|
|
|
|
|
by yawaramin
2014 days ago
|
|
Spyder81 is partly right, 'readable' doesn't mean 'human-readable' per se, it means rather that the compiler tries very hard to produce output JS that looks like idiomatic, hand-written JS. This means things like: - Uncurrying functions - Compiling OCaml modules to idiomatic JavaScript objects - Compiling OCaml record values to idiomatic JavaScript objects - Compiling tail recursion to idiomatic while loops - And so on. > someone might start touching the compiled runtime objects with Javascript and then... god help you as you watch the guarantees of your fancy type system unravel before your very eyes. That's exactly what genType is for--it produces JavaScript, TypeScript, and Flow interfaces for ReScript output code so that people in the JS world can consume it transparently. |
|