Warn about using the GC

claptrap clap at trap.com
Sun Jan 14 12:21:51 UTC 2024


On Sunday, 14 January 2024 at 09:25:18 UTC, Walter Bright wrote:
> Instead of using @nogc, we could have a compiler switch "warn 
> on use of GC" which you can turn on if you like, or not, or 
> turn on the -w switch to treat the gc warnings as errors.

It aint broke so dont fix it.

Nobody who uses @nogc is complaining about it. The people who are 
complaining are people who don't use it, they are complaining 
because it puts extra burden on them to support it. Or it's 
causing fragmentation. (Thats my impression anyway)

And some people who keep having to explain it to newbies 
apparently. But my feeling about that is that it's not that @nogc 
is hard to understand but that they don't understand how GC works 
in general.

Inference on regular non-templated functions would help a bit i 
think.






More information about the Digitalmars-d mailing list