[dmd-concurrency] draft 7

Michel Fortin michel.fortin at michelf.com
Mon Feb 1 14:17:21 PST 2010


Le 2010-02-01 à 16:10, Andrei Alexandrescu a écrit :

> * most functions do take scope parameters, so probably @escaping should be the explicit attribute

Perhaps, but I'm not sure about that. 'scope', being a restriction, is limited to the function where you put it. 'scope' forces the functions it calls to abide by the restriction, just like 'const', @safe, 'nothrow', 'pure', or (perhaps surprisingly) 'deprecated'. It always work that way in D.

This way someone not caring about our little multithreading problems can write a full program without even thinking about 'scope'. This is hardly true for @escaping.

This should somewhat lessen the aggravation.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/





More information about the dmd-concurrency mailing list