2 ms·
> The first thing to note when comparing Go to Java is that Go is a compiled language, As is Java. Sure, compiled into bytecode. Is that so important to you?
by Tomte 6y ago
> The first thing to note when comparing Go to Java is that Go is a compiled language,
As is Java. Sure, compiled into bytecode. Is that so important to you?
> whereas Java requires the presence of a Java Runtime Environment distribution.
There is no JRE anymore, you should use jlink.
Even so, the JRE is more or less equivalent to Go's runtime system.
> The same is true of Java, but since Go produces smaller build artifacts and doesn’t require a separate runtime, it’ll make it easier to distribute components and give you faster startup times.
Have you tried jlink/jpackage? If so, did you see a relevant difference? Then fine, use Go. Most people will be content with what Java has to offer.
> Finally, Go is the language that many developers use for tooling. Implementing Go would allow you to dive into the source code of many of the tools you use on a daily basis, like Kubernetes, a widely-adopted cluster orchestration system, or Docker, the popular containerisation software.
And if you want to dive into Kafka, Solr, ElasticSearch or a myriad of other things (that you just happened to not hand-pick to support your argument), you will need Java.
> Another feature Go and Java share is garbage collection.
And Java has several GC algorithms, in case the default one doesn't fit your workload. And is highly tunable. Why not mention that?
And so on and so on.
Great, you've chosen Go. That's an easily defensible choice, Go is a great language with impeccable heritage.
But your Java bashing isn't convincing.