Hacker News new | ask | show | jobs
by pron 4028 days ago
> It has fewer GC issues compared to Java

No, it has more GC issues. It's just that there aren't yet enough libraries and big applications to make that apparent. It hasn't been stressed enough just yet.

2 comments

I think it's likely that Golang apps won't stress the GC as much as Java does, because of the simple fact that you can't realistically use j.u.c-style concurrent data structures, since you don't have generics. Where the JVM GC really shines is when you're using shared-memory concurrent data structures, which are really great things—however, without generics, programmers just won't use them in the first place.

(I'm not saying this is a negative for Java, BTW; making shared memory data structures both fast and idiomatic is really important if you care about performance of parallel code.)

Why do you think generics are more relevant for concurrent data structures?
Because "programs don't need more than one type of dictionary, so the language can just hard code one implementation in" is at least a defensible position in a single-threaded setting (although I don't agree with it), but it definitely isn't in a scalable parallel setting.
Yeah. Go. The concurrent language with a single, mutable, thread-unsafe dictionary implementation.
It may have more GC issues, or maybe it probably has more GC issues.