On 12/8/2014 2:44 AM, "Marc Schütz" <schue...@gmx.net>" wrote:
On Monday, 8 December 2014 at 10:37:29 UTC, Walter Bright wrote:
Another problem with that is:

  void func(scope T delegate() dg);

Playing the devil's advocate:

     void func(scope(T delegate()) dg);
     void func(scope(T) delegate() dg);

Note that:

    void func(ref T delegate() dg);

has the same problem. The only way to make dg return a 'ref T' is to use an 
alias:

    alias ref T delegate() dg_t;
    void func(dg_t dg);

or put 'ref' as a postfix:

     void func(T delegate() ref dg);

But if the latter solution is used for 'scope', then it interferes with 'scope this'.

Reply via email to