Syntax ideas for `ref` returning delegate and FP parameters
Boris Carvajal
boris2.9 at gmail.com
Sun Apr 11 07:15:17 UTC 2021
On Saturday, 10 April 2021 at 14:27:31 UTC, Q. Schroll wrote:
> Do you guys have any better ideas? I don't really like mine.
https://github.com/dlang/dmd/pull/10018#issuecomment-504347888
In short, allow putting function/delegate keyword at the
beginning like function literals do:
```d
// declaration
function int(char c) fp = function int(char c) { ... };
// also function literal syntax already accepts 'ref' returns
function ref int(char c) fp = function ref int(char c) { ... };
// as parameter
void fun(ref function ref int(char c) fp);
```
More information about the Digitalmars-d
mailing list