4 ms·
Why not just compile OCaml to wasm? Why another language?
by zumu 8y ago
Why not just compile OCaml to wasm? Why another language?
- tom_mellior 8y agoPoking around in the sources, it looks like this is the OCaml compiler, with the frontend apparently tweaked to accept the new syntax. But this is not mentioned anywhere that I can see. The "Copyright copyright 2017-2018 Philip Blair and Oscar Spencer." line in the README is highly misleading in this context, since most of the actual source files are marked with OCaml's copyright header.
- afrisch 8y agoMany files are taken from the OCaml compiler and then adapted, but changes seems a bit deeper than just a different syntax. It would indeed seem fair for the authors to at least make it clear in the toplevel README that the front-end (parsetree representation and type-checking) is indeed / started as a fork of the OCaml code base. Considering ongoing efforts to create a WebAssembly backend for OCaml (and thus Reason), I wonder what would be the selling point of Grain.
- ubertaco 8y agoEven syntactically, this looks a lot like if you took ReasonML, disallowed type annotations, did away with its ecosystem, and compiled to WebAssembly. Aside from the wasm compilation, I don't see why this exists.
- senorsmile 8y agoThat was my question only having recently started looking into ReasonML seriously. Sounds like I'll just stick to Reason!
- tom_mellior 8y ago> Many files are taken from the OCaml compiler and then adapted [...] I went back and checked, and Grain not only takes OCaml's code without clear attribution but redistributes that code under GPLv3 where the original code is under LGPLv2.1. That's bad.