DIP69 - Implement scope for escape proof references

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sun Dec 14 12:27:57 PST 2014


On 12/8/2014 7:23 AM, Steven Schveighoffer wrote:
> What I wanted to know was, when I see scope
> ref, why is it there? When should I use it?

It's there to indicate a parameter is NOT returned by ref.



> When should I use scope? What nasty
> things are prevented if I use it? Examples would be preferable.

http://wiki.dlang.org/DIP69#Ref has examples of errors that are prevented.



More information about the Digitalmars-d mailing list