4 ms·
Some of these statements are very misleading too. > Cosmopolitan makes C a build-once run-anywhere language, similar to Java, except it doesn't require interpr
by roca 6y ago
Some of these statements are very misleading too.
> Cosmopolitan makes C a build-once run-anywhere language, similar to Java, except it doesn't require interpreters or virtual machines be installed beforehand. Cosmo provides the same portability benefits as high-level languages like Go and Rust
That is simply not true. Java, Go and Rust can run programs at native speeds on non-x86-64 architectures, e.g. ARM, but Cosmopolitan cannot, not now and not ever because x86-64 is a terrible IR.
- bmc7505 6y ago> Java, Go and Rust can run programs at native speeds on non-x86-64 architectures, e.g. ARM, but Cosmopolitan cannot These things are not mutually exclusive. Nothing is stopping you from shipping a JVM, Go, or Rust app ontop of Cosmopolitan.
- roca 6y agoThat's not the claim though. The claim is that Cosmopolitan offers the same portability benefits as Java, Go and Rust, not that Cosmopolitan + (Java, Go, Rust) offers the same portability benefits as (Java, Go, Rust). Also the latter claim is not true AFAIK. For example if Cosmopolitan were to support all the architectures Rust supports, at native speeds, it would have to support packaging the compiled code for those different architectures into some kind of super-fat-binary. Currently it only supports x86-64.
- roca 6y agoActually Cosmopolitan doesn't support threads so Java, Go and Rust won't work at all on top of it. https://github.com/jart/cosmopolitan/blob/master/libc/runtime/pthread.c https://github.com/jart/cosmopolitan/blob/master/libc/runtim...