DIP69: problem with scope grammar - need a new keyword
Manu via Digitalmars-d
digitalmars-d at puremagic.com
Tue Dec 9 00:27:32 PST 2014
On 8 December 2014 at 19:45, Walter Bright via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> I thought I could make this work, but it's a problem. There are two meanings
> for scope when attached to a function:
>
> T func() scope; // the 'this' pointer is 'scope'
> scope T func(); // the function returns a 'scope' T
>
> I have some ideas, but don't particularly like any of them. But I don't want
> to bias things, so what ideas do you guys have?
The solution is obvious; function should return scope(T)
;)
More information about the Digitalmars-d
mailing list