Escape analysis

Denis Koroskin 2korden at gmail.com
Mon Oct 27 15:22:14 PDT 2008


On Tue, 28 Oct 2008 01:15:24 +0300, Walter Bright  
<newshound1 at digitalmars.com> wrote:

> Robert Fraser wrote:
>> I get the feeling that D's type system is going to become the joke of
>> the programming world. Are we really going to have to worry about a
>> scope unshared(invariant(int)*) ...? What other type modifiers can we
>> put on that?
>
> That argues that "noscope" should be the default. Using "scope" would be  
> an optional optimization.
>
> BTW, "unshared" is the default. "shared" would be the keyword.

I hope that 'noscope' is considered to be default *not* because is would  
introduce one more keyword otherwise...

OTOH, noscope *should* be a keyword in either case, due to some casts:

scope int* sp;
noscope int* nsp;

nsp = cast(noscope int*)sp;
sp = cast(scope int*)nsp;



More information about the Digitalmars-d mailing list