Live data from Hacker News

The Garbage Collection Handbook, 2nd Edition

routledge.com

21–30 of 174 posts

Re: The Garbage Collection Handbook, 2nd Edition

#22
post #5

20 years ago in the programming languages lesson at the university we started learning about OOP using Java and Ada as examples. When the professor started describing Java, a fellow student interrupted him to inform the class that "Java has garbage collection" (and boast of his special knowledge). After that incident his nickname was "the garbage collector"!

Coincidentally, Ada optionally supports garbage collection in its specifications but it's up to the runtime to implement it.

Re: The Garbage Collection Handbook, 2nd Edition

#23
post #16

Earlier quoted context omitted.

Rust also uses reference counting, probably the worst sort of garbage collection.

Tracing is the worst in terms of performance

That depends. Deallocating a zillion little objects one a a time can be slower than doing them all in a batch.

Re: The Garbage Collection Handbook, 2nd Edition

#25
Met Richard Jones, one of the authors of the book, at its original launch. Very nice guy. Bought the original book and did some heavy reading on it – if you get this book, be prepared to put time into it, it's readable but it's not one you can do a quick skim of – and I really profited from it. It should be required reading for all programmers.

(To be clear, I'm referring to the very first version, I haven't read the subsequent versions but given the quality of the first I'd be very surprised if they were any less good).

Edit: https://www.cs.kent.ac.uk/people/staff/rej/ - a jumpoff page for his stuff.

Edit2: https://www.cs.kent.ac.uk/people/staff/rej/gcbib/ - "[This] online bibliographic database includes nearly 3,000 garbage collection-related publications. It contains abstracts for some entries and URLs or DOIs for most of the electronically available ones, and is continually being updated. The database can be searched online or downloaded as BibTeX, PostScript, or PDF." Welcome to the ultimate rabbit hole I guess.

Re: The Garbage Collection Handbook, 2nd Edition

#27
post #22
post #5

20 years ago in the programming languages lesson at the university we started learning about OOP using Java and Ada as examples. When the professor started describing Java, a fellow student interrupted him to inform the class that "Java has garbage collection" (and boast of his special knowledge). After that incident his nickname was "the garbage collector"!

Coincidentally, Ada optionally supports garbage collection in its specifications but it's up to the runtime to implement it.

And since no implementation has ever supported it, it has been deprecated in ISO Ada 95 and further removed from it on ISO Ada 2012.

https://en.wikibooks.org/wiki/Ada_Programming/Pragmas/Contro...

Re: The Garbage Collection Handbook, 2nd Edition

#28
if you need code to understand garbage collection, there is walkthrough of garbage collector and C code at http://maplant.com/gc.html is really helpful.

I tweaked it to work on amd64 and started adding register scanning based on what eatonphil's discord people told me to do.

https://github.com/samsquire/garbage-collector

It's not fit for any purpose but more of a learning exercise.

Re: The Garbage Collection Handbook, 2nd Edition

#29
post #16

Earlier quoted context omitted.

Rust also uses reference counting, probably the worst sort of garbage collection.

Tracing is the worst in terms of performance

Not really, here it is winning hands down over Swift's ARC implementation.

https://github.com/ixy-languages/ixy-languages

Post reply on HN