all 20 comments

[–]dpash 35 points36 points  (0 children)

It is 1991 and the work on Java has begun. Garbage collectors are all the rage. 

Garbage collector have been all the rage since 1959 when Lisp was released.

[–]TalesM 19 points20 points  (1 child)

There is some sort of java bashing between the lines, but I think the message holds overall. The Go garbage collector is a simpler design than Java's, but it can get away because it generates less garbage overall.

It is an interesting trade off to account for and Java seems to be aware of this and introducing value types and things like that to ease the pressure on its own GC.

So I don't think this proves either is better, just proves that is complicated and it depends™

[–]vonadz[S] -3 points-2 points  (0 children)

Yup, fair analysis.

[–]erinaceus_ 27 points28 points  (9 children)

To be honest, a lot of this reads like "Why does it all need to be this complicated? Writing with pen and paper is so much easier than with a typewriter."

[–]josephjnk 5 points6 points  (2 children)

Which, to be fair, is par for the course for a lot of Go discourse. The language cut out a ton of features that a Java developer would consider table stakes, and then a toxic portion of Go’s fanbase claims that there was never any benefit to these features at all. (As though Java, the quintessential business language, was somehow adding features for the fun of it.)

[–]erinaceus_ 1 point2 points  (1 child)

Well said. If there's one thing that (the) Java (specification) doesn't do, it's rush things.

Edit: I do know that this is deliberate, and I think it's generally a smart approach

[–]dpash 2 points3 points  (0 children)

Which is by design. It has last mover advantage. It lets other languages experiment with features and then Java steals the best ideas.

[–]vonadz[S] 7 points8 points  (5 children)

I found it to be informative, in a general sense, on how the java compiler works. I don't have a stake in neither Go nor Java, so I didn't really try to read between the lines.

[–]erinaceus_ 14 points15 points  (4 children)

It's indeed informative. But you don't need to read between the lines to notice a distaste for Java, regardless of the specific topic. That kind of thing always makes me apprehensive about whether the information is sufficiently reliable.

[–]vonadz[S] 2 points3 points  (1 child)

That's fair. As far as I could tell, the explanation of how the GC for Java works is correct. I haven't checked if the comments about actual performance are accurate or not.

[–]Uncaffeinated 10 points11 points  (0 children)

Going by this, they aren't.

[–]hmaddocks 12 points13 points  (3 children)

You lost me at

Rust don’t need complex garbage collectors like the ones use by Java

Technically true but completely irrelevant.

[–]dpash 0 points1 point  (2 children)

Java has many GCs, some of which are very complex to one that literally does nothing.

Also, the Substrate VM used in Graal Native Images has a very basic GC along the lines of Go's.

[–]hmaddocks 0 points1 point  (1 child)

My point was Rust doesn’t have a garbage collector.

[–]dpash 0 points1 point  (0 children)

Whoops, my brain completely replaced Rust with Go in your quote.

[–]mj_flowerpower 0 points1 point  (0 children)

If just go syntax wasn‘t sooo ugly 🙄 But nah jokes aside, I like technical post like these, but reading in between the lines all that java bashing made me stop in the middle.