Hacker News new | comments | show | ask | jobs | submit login

The whole point (or rather, one of the points) of Java and .net are that they are NOT compiled to native code but to bytecode so that you can write code once and then run it on many different systems without having to compile it again.



One does not preclude the other, it is only a matter of distribution, like the mainframes taught us eons ago, by combining JIT/AOT on their toolchains.

The fact that Oracle, Microsoft, Google and Apple are now on the JIT/AOT train, tells it all.

To be fair, .NET always had AOT native compilation support from the early days, but NGEN is a simple AOT compiler only meant for faster startup.


Even hello world programs tend to show different performance characteristics on different OS/platforms. The idea of write once, run everywhere is over. In a moderately complex software, changing the OS/platform is a non trivial problem. Recompiling the code (which is mostly automated) is the least problematic part of it.


Are you familiar with the joys of autoconf, cmake and friends? Have you tried writing a non-trivial application that simply compiles on different flavors of Linux and Windows? Compiling on different platforms is also a non-trivial problem. Having a virtualised platform that abstracts away differences between OS makes it vastly easier to write portable applications.

For many applications running on a VM on different platforms Just Works. The idea is most definitely not over, in fact it is becoming ever more popular. Just look at the rise of abominations like Electron.


Those joys are only enjoyed for those that insist into using C with POSIX APIs covering for lack of a rich standard library.

We don't need VMs, what we need is rich libraries and there are plenty of languages with support for AOT compilation to native code with such libraries.

Something that even C++ is finally adopting.

Regarding Electron, I hope it joins MSHTML in a couple of years.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: