D is our last hope

Kagamin spam at here.lot
Mon Dec 11 09:08:25 UTC 2023


On Thursday, 7 December 2023 at 19:01:26 UTC, GrimMaple wrote:
> If you want to have a `@nogc` control in a UI framework and 
> have callbacks/events in it, you are going to force the user of 
> that control to use `@nogc` code.

A similar problem happens when `@safe` code calls `@system` 
callbacks. I recommend to make the callback setter to be declared 
`@system` and then cast it to `@safe`, so if something goes 
wrong, it's not your mistake.


More information about the Digitalmars-d mailing list