RFC: Last words on Primary Type Syntax aka. `ref` return function pointer type sytnax
Quirin Schroll
qs.il.paperinik at gmail.com
Mon Jul 7 16:02:52 UTC 2025
On Friday, 4 July 2025 at 14:59:22 UTC, Richard (Rikki) Andrew
Cattermole wrote:
> Will these work with Walter's approach?
I’ll answer these for four cases:
- Works with no approach: *ill-formed*
- Works with Walter’s approach: *WB yes*
- Works with my approach: *QS yes*
- Works with both: *both yes*
and add a comment.
> ```d
> scope (scope void delegate()) del1; // ill-formed
> (scope void delegate()) del2; // ill-formed
> scope (void delegate()) del3; // WB no // QS yes
> (void delegate()) del4; // both yes
> ```
>
> ```d
> scope (scope void delegate()[1]) del5; // ill-formed
> (scope void delegate()[1]) del6; // ill-formed
> scope (void delegate()[1]) del7; // WB no // QS yes
> (void delegate()[1]) del8; // both yes
> ```
As far as I can tell, Walter’s approach allows a subset of what
mine allows, given the current state of the language plus the
DIP, possibly modified for Walter’s approach.
> If it does, then we will have the ability to teach the syntax
> to a wide range of people regardless of the specifics.
I have no idea what you mean by this.
More information about the Digitalmars-d
mailing list