Warn about using the GC

Paolo Invernizzi paolo.invernizzi at gmail.com
Sun Jan 14 19:28:18 UTC 2024


On Sunday, 14 January 2024 at 13:48:14 UTC, Guillaume Piolat 
wrote:
> On Sunday, 14 January 2024 at 13:32:14 UTC, Alexandru Ermicioi 
> wrote:
>>
>> Perhaps there should be a `@trustedgc`, similar to 
>> what`@trusted` is in safe system?
>> That would fix callback issue.
>>
>> Best regards,
>> Alexandru.
>
> In favor of this.
>
> In the other thread Walter's solution is to write a delegate 
> that uses no GC but isn't marked @nogc. This is were such a 
> attribute could intervene.
>
> It would be a nice symmetry with @safe/@trusted/@system if we 
> had @nogc/@trustedgc/@gc but then perhaps not the mental load 
> most people want ouf ot stuff they don't care about. But if I 
> don't care about @safe, @trusted helps me a lot more.

+1, explicit is better then implicit


More information about the Digitalmars-d mailing list