Escape analysis (full scope analysis proposal)

dsimcha dsimcha at yahoo.com
Sun Nov 2 09:06:59 PST 2008


== Quote from bearophile (bearophileHUGS at lycos.com)'s article
> 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.
> Bye,
> bearophile

And a monitor.  And RTTI. Then again, for code that absolutely must be as
efficient as possible, doing some fairly hackish/unsafe things is generally
considered more acceptable than in run-of-the-mill programming.  In these cases,
you could always do it with structs and just use the casts.  In the other 97% of
cases, when we should forget about small efficiencies, a class works fine.



More information about the Digitalmars-d mailing list