Not quite:
* no generics
* error prone error handling
* non tunable GC
* null pointers
* golang interfaces are messy and can't be used to tag structures
* golang time package is garbage
and lots more
Java today is superior to golang in almost every front.
Compilation times are not that different, especially when using incremental compilation. I worked on large projects in both languages, and for any non-trivial code base, the difference isn't that far off.
I'd argue that readability is better in Java due to things like non-clutter due to error handling, and the existence of generics.
Deployment has been solved for a while now with building shadow jars[1].
[1] Not to mention offerings like: https://quarkus.io/
I you're looking for high throughput you just need to allocate less. Or use unsafe. And it's totally doable.
And the same approaches can be done in Java (e.g. self-managed off heap allocations), even more-so when they introduce value types.
func main() {
n := 1
fmt.Println(n)
}
Object pooling won't help here.The new GCs on the JVM have very few parameters to tune, I think Shenandoah or ZGC have only two parameters to set up, can't get much simpler.
Escape analysis was just rewritten, and the objective is to handle this case more gracefully.
No, but seriously, you didn't get what I was saying there. The whole reason Go might be of interest is that it is loosely C-like in a way that Haskell and Ocaml are not.
It's a C-like language with GC, that compiles to native code supported by an efficient runtime, and can work effectively with parallel/concurrent code. In many ways it's Java done right, or a more intuitive (and from certain POVs, preferable) alternative to Haskell and Ocaml. That would seem to be enough to drive adoption.