R
Richard Heathfield
Philip Potter said:
Perhaps, but you may be mistaken as to the issues at stake.
No, I'm sure it has a place in other languages. I just don't think it sits
very well with C, for at least two reasons:
1) As we have already seen upthread, automatic garbage collection (AGC)
encounters serious difficulties when faced with C's heavy use of pointers
for keeping track not only of memory blocks but of particular positions
within them.
2) C is commonly used where not only performance but even timing (in
real-time stuff) is an important criterion for acceptance of the program,
and AGC implementations are notorious for introducing arbitrary delays at
various times through a program's run.
As I have already agreed, AGC is undoubtedly of value to some people in some
situations. I just don't think AGC is a good fit for C programmers, in the
general case. That's not to say that it might not be useful on occasion,
but I don't believe such occasions are sufficiently common to make the
subject a worthwhile diversion away from the topic of this newsgroup, which
is C programming, *not* "C programming + Jacob Navia's AGC extensions".
Were this discussion taking place in Jacob Navia's own newsgroup,
comp.compilers.lcc, then I would not have raised any objections at all.
Richard, while you have earned a lot of my respect and admiration through
your posting, I do feel that you are on a little bit of a crusade here.
Perhaps, but you may be mistaken as to the issues at stake.
You seem to be arguing that because garbage collection can't protect
against all memory leaks without care from the user, it is worthless.
No, I'm sure it has a place in other languages. I just don't think it sits
very well with C, for at least two reasons:
1) As we have already seen upthread, automatic garbage collection (AGC)
encounters serious difficulties when faced with C's heavy use of pointers
for keeping track not only of memory blocks but of particular positions
within them.
2) C is commonly used where not only performance but even timing (in
real-time stuff) is an important criterion for acceptance of the program,
and AGC implementations are notorious for introducing arbitrary delays at
various times through a program's run.
As I have already agreed, AGC is undoubtedly of value to some people in some
situations. I just don't think AGC is a good fit for C programmers, in the
general case. That's not to say that it might not be useful on occasion,
but I don't believe such occasions are sufficiently common to make the
subject a worthwhile diversion away from the topic of this newsgroup, which
is C programming, *not* "C programming + Jacob Navia's AGC extensions".
Were this discussion taking place in Jacob Navia's own newsgroup,
comp.compilers.lcc, then I would not have raised any objections at all.