J
John Bode
Hi Can anyone explain why C has added support for pthreads, while NOT
adding support for garbage collection? Convenient memory management would
be a much greater enhancement than replicating a perfectly good existing
library it seems to me.
Jase
The main objection to automatic garbage collection in general that I've seen is its non-determinism, which can play hell in a realtime system. The general response to *that* is "when's the last time you had to work on a hardrealtime system, Jack?" (for me, the answer is "never").
Could be there was simply more demand from the C programming community for language-supported threading than for AGC.
Could also be that WG14 felt that the changes necessitated by threading were enough for one revision, or that the changes necessitated by GC would negatively impact legacy code or be too hard to implement with the current C architecture. I know that for myself, the behavior of malloc/realloc/calloc/free had damned well better not change *at all*; if you're going to add AGC, create a new library or add new functions to stdlib.
I haven't seen a C 2011 Rationale; would be nice to know what WG14 was thinking for this revision.
Seebs?