Warn about using the GC

Guillaume Piolat first.name at gmail.com
Sun Jan 14 12:31:04 UTC 2024


On Sunday, 14 January 2024 at 12:21:51 UTC, claptrap wrote:
> 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

+1
We use it because we have to.
When we transitionned to @nogc, only part of the code had the 
@nogc attribute, so how could we done that with just a switch.
When we make a @ngoc library, we can currently add a GC-using 
function to throw in case the no- at nogc people want to use the 
library...
And what happened of the promise to not break things.
I don't understand the complaints at all.



More information about the Digitalmars-d mailing list