| ▲ | hamstergene 6 hours ago | |||||||||||||||||||||||||||||||
What I didn’t like about this series of books was choosing “garbage collection” as umbrella term for both tracing GC and reference counting, without verifying if programming community would agree with that, which turned out they didn’t. I’ve seen a lot of threads here and on reddit where people were arguing about terminology purely because of this book alone. By that definition, C++ code has garbage collection if it uses std::shared_ptr, going against widespread common usage of the term “garbage collected programming language” which specifically contrasts manual languages like C++ or Rust against garbage collected ones. “Automatic Memory Management” is a lot more suitable description to what programmers have to do to manage memory; it is now in the title but still hasn’t become the primary term. | ||||||||||||||||||||||||||||||||
| ▲ | pron 6 hours ago | parent | next [-] | |||||||||||||||||||||||||||||||
> What I didn’t like about this series of books was choosing “garbage collection” as umbrella term for both tracing GC and reference counting, without verifying if programming community would agree with that, which turned out they didn’t. This has been the standard terminology in memory management research for many decades. The only programmers who don't like it are those who don't understand the principles of memory management. > By that definition, C++ code has garbage collection if it uses std::shared_ptr That's right. > going against widespread common usage of the term “garbage collected programming language” which specifically contrasts manual languages like C++ or Rust against garbage collected ones. Since this contrast mostly exists in the minds of people who don't understand memory management, going against this common misconception is good. That's not to say that there aren't some interesting tradeoffs that often align with the colloquial perception, "garbage collection" isn't the interesting part. As you said, both C++ and Rust use GC; in fact, they use a GC somewhat similar to the one used by CPython. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ▲ | trumpdong 6 hours ago | parent | prev [-] | |||||||||||||||||||||||||||||||
The Linux kernel has garbage collection, and not just the controversial refcount kind. | ||||||||||||||||||||||||||||||||