5 ms·
When different code needs different JVMs, it gets to be a pain. The Go advantage is a fat binary, no dependencies.
by bsg75 11y ago
When different code needs different JVMs, it gets to be a pain. The Go advantage is a fat binary, no dependencies.
- meddlepal 11y agoEmbed the JRE then. You have to build packages for each platform you want to support, but that's no different than Go. Besides that, different JVM's? Very rarely does code depend on a specific JRE unless we're talking between versions (say 7 vs. 8), but you would have the same problem in Go if significant language changes were made between releases.
- twistedpair 11y ago> When different code needs different JVMs With the JVM you can use HotSpot, Dalvik, WebSphere, or OpenJDK. The JVM is just a spec. With Go, you've only got one runtime to choose from. That said, if you code to the JVM spec, then you don't care what implementation you run on.
- loudmax 11y ago> With Go, you've only got one runtime to choose from. Since Go compiles to a binary, the concept of a runtime doesn't apply the same way it does for Java. You can compile a Go program with the Go project's compiler or with the GCC. The GCC Go compiler uses different optimizations and may produce faster binaries in some circumstances. Since the Go language is also a spec, other compilers may arise if there's a demand.
- twistedpair 11y agoCorrect. With Java I've got at least 4 compilers (JDK's) to choose from.