Discussion Thread: DIP 1032--Function pointers and Delegate Parameters...--Community Review Round 1

Walter Bright newshound2 at digitalmars.com
Sat Apr 11 00:05:45 UTC 2020


On 4/10/2020 5:22 AM, Steven Schveighoffer wrote:
> No, you don't "make" foo pure, it is specifically marked pure.
> 
> In other words, you have:
> 
> void foo(void delegate() @called) pure @nogc @safe { dg(); }
> 
> So the @called attribute says "foo calls dg", which means that for a specific 
> call of foo, you can strip off attributes that it doesn't have.

Sorry, that's still another way of saying the same thing - foo()'s 
implementation has to be pure-compatible. This is impractical for reasons mentioned.


More information about the Digitalmars-d mailing list