Trying to use Mir ion, its a perfect example of the failure of D's attribute system

Walter Bright newshound2 at digitalmars.com
Fri Jan 20 01:45:31 UTC 2023


On 1/19/2023 5:14 AM, Adam D Ruppe wrote:
> So if someone in a library wrote
> 
> void process(void delegate() userData) @nogc {}
> 
> it is going to force userData to be nogc regardless of their own desires.

If process calls userData, then that is as it should be. If userData is just 
being "passed through" and not called, then the easiest workaround is to cast it 
to something innocuous, or use a union.


More information about the Digitalmars-d mailing list