DIP69 - Implement scope for escape proof references
H. S. Teoh via Digitalmars-d
digitalmars-d at puremagic.com
Thu Dec 4 13:27:59 PST 2014
On Thu, Dec 04, 2014 at 12:58:56PM -0800, Walter Bright via Digitalmars-d wrote:
> On 12/4/2014 7:25 AM, Steven Schveighoffer wrote:
[...]
> >I don't see where the proposal defines what exactly can be returned
> >via scope.
>
> The scope return value does not affect what can be returned. It
> affects how that return value can be used. I.e. the return value
> cannot be used in such a way that it escapes the lifetime of the
> expression.
[...]
Ahhh, this certainly clears things up a lot. You should add this
explanation to the DIP.
T
--
Famous last words: I *think* this will work...
More information about the Digitalmars-d
mailing list