News for hackers. Stuff that matters.
Re:Garbage Collection for Systems Programmers by dasyatidprime on Saturday March 30, 2024 @04:23PM (#39878259)
I have to wonder whether some of this is semantic drift over time or context. My recollection since undergrad (a few decades ago) involves treating “garbage collection” as referring to tracing garbage collection, and “reference counting” as a separate mechanism. There is still a term for the category including both, only that term is not “garbage collection” but “automatic memory management”. But what I see nowadays is closer to what you describe.
Re:Garbage Collection for Systems Programmers by zozbot234 on Saturday March 30, 2024 @04:26PM (#39878291)
Automatic memory management is more general than that, it also includes stack allocation.
Re:Garbage Collection for Systems Programmers by dasyatidprime on Saturday March 30, 2024 @04:41PM (#39878438)
I agree; I meant “including” in the non-restrictive sense, not “including only”. Stack allocation is a special case where the lifetimes are arranged in a convenient way—see also escape analysis in languages where stack allocation isn't explicitly supported at the language level but can be added by the compiler.
Re:Garbage Collection for Systems Programmers by yxhuvud on Sunday March 31, 2024 @09:43AM (#39884175)
If anything, the drift is towards GC being only tracing as it is so dominant in the languages that are normally considered having GC. But before C++ (via boost) introduced shared pointers, and Swift ARC, I'd expect the separation to basically not exist.