Escape analysis (full scope analysis proposal)

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Nov 2 08:05:15 PST 2008


bearophile wrote:
> Andrei Alexandrescu Wrote:
>> * If people want to implement e.g. linked lists, they should do it
>> with classes.
> 
> UHm... I see. But I am not sure I like that. Isn't that a waste of
> memory? All objects have a vtable.

Yah, we can't get rid of that. Possibilities discussed were (a) make 
final classes not have a vtable, and (b) define a new kind of struct 
that's only heap allocated. Walter thinks both add quite some 
complication for little benefit. Let's not forget that a cast will allow 
the trick for those interested in saving the extra word.

Andrei



More information about the Digitalmars-d mailing list