named arguments, string interpolation, please stop.

Walter Bright newshound2 at digitalmars.com
Thu Jan 11 21:37:01 UTC 2024


On 1/11/2024 1:18 PM, DrDread wrote:
> this is discarding the use case that you want to mark only parts of your 
> codebase nogc, but enforce it'S really nogc. we do use some realtime threads, 
> but the rest off the app is @gc.

This subthread suggests to me that the problem with @nogc is it works.

It reminds me of a similar debate when we added `const` to the type system. 
Unlike C++, const in D is ruthlessly enforced. People wanted something called 
"logical const" where some construct pretends to be const when it was actually 
being mutated.

Logical const code cannot take advantage of it being const because it isn't 
constant.

I don't see much utility in a "logical @nogc" that allows using the gc anyway.

If you want to use the gc, don't use @nogc.


More information about the Digitalmars-d mailing list