DIP71: 'noscope' and 'out!param' attributes

Zach the Mystic via Digitalmars-d digitalmars-d at puremagic.com
Sun Jan 18 10:38:21 PST 2015


On Sunday, 18 January 2015 at 18:17:17 UTC, Meta wrote:
>> I have a lot of other thoughts about this issue, but I want to 
>> save them for a different thread.
>
> If your function is marked as pure, then escape by global is 
> impossible.

Maybe it could just be made illegal to copy *any* parameter 
reference to a global in @safe code. It does seem like a @system 
type of thing to do anyway. Use the existing @trusted attribute 
to deal with this one. It definitely seems rare enough to demand 
that the programmer mark it @trusted. I'm not sure, though. 
Basically, @trusted is the blunt instrument, 'noscope' is the 
fine one.


More information about the Digitalmars-d mailing list