scope, inline, optimizations, scoped attributes
Brad Roberts
braddr at bellevue.puremagic.com
Wed Aug 5 10:29:44 PDT 2009
On Wed, 5 Aug 2009, bearophile wrote:
> But D contains "scope" to suggest the compiler to stack allocate a class
> instance.
Stop there. Scope doesn't mean stack allocate. Scope means controlled
lifetime. The use of stack versus heap is an implementation detail and an
optimization. Not that it's not a useful optimization, but that's
secondary to the semantics of lifetime.
Later,
Brad
More information about the Digitalmars-d
mailing list