OSNews thread here degenerates into GC vs not

Mike Capp mike.capp at gmail.com
Mon Nov 20 17:22:13 PST 2006


Sean Kelly wrote:

> That sounds like bad program design rather than
> bad GC design.  Were the app written using
> conventional allocation it would either be visibly
> slow or leak like a sieve.

Probably. And I suspect the codebase we use it on is larger than usual. But then,
you could offer the same retort to any reported "for real" GC problem.

[snip sensible answers to questions 1 and 2]

Re implementation, I think the concerns are that it's non-copying (which leaves
doubts over whether a copying implementation would work) and that it's not
type-aware (which effectively forces you to use malloc for large POD allocations,
beside the false-positive issues).

> Stack allocation of classes could be better,
> though 'scope' is a decent enough substitute
> if heap allocation isn't a problem.

Yes, that's pretty much my impression. Stack allocation for 'scope' classes would
be very nice, but not an absolute must have. It looks as if the gubbins required
to do this manually could be templated/mixedin as a stopgap.

Thanks for the thoughtful response.

Mike



More information about the Digitalmars-d mailing list