Escape analysis

Jason House jason.james.house at gmail.com
Mon Oct 27 21:13:21 PDT 2008


Walter Bright Wrote:

> Michel Fortin wrote:
> > On 2008-10-27 18:15:24 -0400, Walter Bright <newshound1 at digitalmars.com> 
> > said:
> > 
> >> That argues that "noscope" should be the default. Using "scope" would 
> >> be an optional optimization.
> > 
> > I don't think you have much choice. Take these examples:
> > 
> >     scope(int*)* a; // noscope pointer to a scope pointer.
> > 
> >     noscope(int*)* b; // scope pointer to a noscope pointer.
> > 
> > Only one of these two makes sense.
> 
> scope is a storage class, not a type constructor.

How do you treat members of objects passed in? If I pass in a struct with a delegate in it, is it treated as scope too? What if it's an array? A class?



More information about the Digitalmars-d mailing list