5 ms·
It can generate portable and human readable C? Can you link to some information about that?
by jjnoakes 10y ago
It can generate portable and human readable C?
Can you link to some information about that?
- loup-vaillant 10y agoNothing of the sort. But on the platforms it compiles to, Ocaml can generate object files that look like they came from C. I use this feature right now to integrate a compiler in an otherwise C++ project. Here's a link to the FFI documentation: http://caml.inria.fr/pub/docs/manual-ocaml/intfc.html http://caml.inria.fr/pub/docs/manual-ocaml/intfc.html But I run on Debian stable on x86-64. Not exactly an exotic platform.
- jjnoakes 10y agoIs this not the bytecode embedded in C which I mentioned above?
- loup-vaillant 10y agoNo. It's native code, with the native runtime embedded in C.
- jjnoakes 10y agoI see. So it gets me part of the way there; if only ocaml ran on my platforms. Thanks.