by Depado · 10y ago · 0 comments
People like JVMs because they provide a lot of services that are really useful, such as:
• State of the art garbage collectors, which you can tune for throughput or low pause times (there's a fundamental tradeoff here, there's no one-size-fits-all GC algorithm)
• Visual debugging that always works, including remotely
• Stack traces that always works
• Advanced profiler and monitoring tools
• Very robust and portable build systems
• Extremely fast compiles (this is touted as an advantage of Go, but I never find myself waiting for a compiler when working with Java or Kotlin).
• Giant standard library and even larger ecosystem of well designed and documented libraries to do many different tasks
• Language interop - you can normally use libraries written in one JVM language from others. This obviously helps with the former point.
• In some cases (e.g. actor frameworks and big web servers) code hotswapping and dynamic loading.
The Go runtime lacks a good chunk of these useful features: the last time I worked with a Go shop they told me debugging hardly worked, because error handling was "propagate an error code" they never had stack traces in their logs for failures, profiling was primitive or not available at all depending on platform, the standard library was small (compared to the JDK), and language interop was "it can call C". Also the GC sucked, though I heard they have a better one now. But it's still a one-size-fits-all approach, which has well known problems.