named arguments, string interpolation, please stop.

Walter Bright newshound2 at digitalmars.com
Fri Jan 12 07:27:45 UTC 2024


On 1/11/2024 5:21 PM, H. S. Teoh wrote:
> 	void registerCallbackSystem(void delegate() @system cb) @system;
> 	void registerCallbackSafe(void delegate() @safe cb) @safe;
> 	void registerCallbackNoGc(void delegate() @nogc cb) nogc;
> 	void registerCallbackSafeNoGc(void delegate() @safe @nogc cb) @safe@ nogc;

To make it work with both @safe and @system code, use @trusted.

To make code usable with both -betterC and regular D, just don't use the gc in 
it. No need to put @nogc in it.



More information about the Digitalmars-d mailing list