5 ms·
Go and modern C++ are both quite a bit more terse than Java. They also produce binaries which don't necessarily require a runtime to be available on every serv
by getsat 11y ago
Go and modern C++ are both quite a bit more terse than Java. They also produce binaries which don't necessarily require a runtime to be available on every server (just ABI compatibility).
(I have no horse in this race, I am just writing what I think the grandparent comment was referring to)
- pjmlp 11y ago> They also produce binaries which don't necessarily require a runtime to be available on every server Just like Java[0]. It is just a matter of choosing the right compiler for the use case at hand. [0] - http://www.excelsiorjet.com/ http://www.excelsiorjet.com/ (one from many vendors)
- Alupis 11y agoThere's also things like exec4j which bundles everything including a JVM into an executable which one can just run... and things like AdvancedInstaller and Install4j will also allow one to bundle a JVM. So producing a binary which doesn't require a separate runtime really isn't a problem.
- pjmlp 11y agoSince you mention it, Java 8 brings bundling and installers support into the reference JDK.
- getsat 11y agoCool concept, I didn't realise this existed. Can you run Hadoop and friends under this? I've worked at companies with over 500 servers in a Hadoop cluster and literally never once heard about anything other than using Oracle's JRE aside from one proposal to use OpenJDK which was shot down pretty quickly.
- Alupis 11y agoWay back in the day, GCC's gcj compiler would do AOT compilation of Java, however I believe it stopped being developed at jdk5 support.
- pjmlp 11y agoIf I am not mistaken most the developers abandoned the project to work on the Eclipse compiler and OpenJDK when those projects became available. GCC only keeps gcj around due to its unit tests.
- pjmlp 11y agoI don't have experience with Hadoop. Almost all commercial JVMs have some form of AOT or JIT caching, specially those that target embedded systems. Sun never added support to the reference JVM for political reasons, as they would rather push for plain JIT. Oracle is now finally thinking about adding support for it, with no official statement if it will make it into 9 or later. JEP 197 is the start of those changes, http://openjdk.java.net/jeps/197 http://openjdk.java.net/jeps/197 Oracle Labs also has SubstrateVM, which is an AOT compiler built with Graal and Truffle.
- swills 11y agoC++ does usually require a runtime.
- yoklov 11y agoC++'s runtime is small and ubiquitous. Depending on how the software is written (if it allows disabling exceptions and rtti), it might be the same size as C's runtime, which is practically (but not totally) nonexistant. I'm not an expert on Java, but my experience with it is that it's runtime is fairly huge and requires custom installation.
- swills 11y agoWhich C++ runtime is ubiquitous? I can think of at least 3 C++ runtimes (MS, libstdc++, libc++).
- bandrami 11y agoC++'s runtime is worse than Java's in that sense. Most JVMs can run most Java bytecode, but your libstdc++ has to be from the same version of the same compiler that your application was compiled with.
- Alupis 11y agoIt was quite surprising for me the first time I did a little embedded work and discovered I couldn't run binaries that were compiled against glibc on my musl-libc based system, and vice-versa. I had initially thought they all just supported the same c89 spec so should work...
- deleted 11y ago[deleted]
- deleted 11y ago[deleted]
- deleted 11y ago[deleted]