named arguments, string interpolation, please stop.
Walter Bright
newshound2 at digitalmars.com
Fri Jan 12 07:20:31 UTC 2024
On 1/11/2024 5:21 PM, H. S. Teoh wrote:
> void registerCallback(void delegate() cb);
>
> Problem: @safe code can't call this. @nogc code can't call this. BetterC
> code can't call it either.
```d
extern(C) void registerCallback(void delegate() cb)
{
cb();
}
void boo()
{
extern (C) void delegate() cb;
registerCallback(cb);
}
```
compiles with -betterC
More information about the Digitalmars-d
mailing list