2 ms·
> You can run all those languages on top of the JVM! Do you have a source for this? I'm sure it's theoretically possible in a Turing-completeness sense, but c
by yellowapple 8y ago
> You can run all those languages on top of the JVM!
Do you have a source for this? I'm sure it's theoretically possible in a Turing-completeness sense, but considering Java lacks any concept whatsoever of a pointer, and considering that most (if not effectively all) C code uses pointers pretty extensively, I find it unlikely that this statement is meaningfully true without some severe efficiency penalties.
- chrisseaton 8y agoFor example Sulong runs C, C++, Rust https://llvm.org/devmtg/2016-01/slides/Sulong.pdf https://llvm.org/devmtg/2016-01/slides/Sulong.pdf. I use it to run unmodified C extensions for the Ruby programming language on top of the JVM. Truffle C is another example https://www.manuelrigger.at/downloads/trufflec_thesis.pdf https://www.manuelrigger.at/downloads/trufflec_thesis.pdf.
- appcypher 8y agoThanks to GraalVM. Well, that wasn't always the case and it prompted the need for WASM.
- fulafel 8y agoWebassembly came from asm.js, which came from Emscripten. These 3 are a lineage of the same c compilation model targeting a JS Uint8Array as the c heap. Emscripten was published a long time ago, probably 10 years? So, JVM has byte arrays too...