Discussion about deprecating @nogc and workarounds
Sebastiaan Koppe
mail at skoppe.eu
Sun Sep 8 06:56:09 UTC 2024
On Sunday, 8 September 2024 at 00:10:05 UTC, Kapendev wrote:
> You just don't use `@nogc`.
> My point is that your code is already nogc. No need for an
> attribute.
Same can be said for every other attribute, let's get rid of all
of them!
No of course not. We use attribute not because we can't write
that code without them, but because we want the compiler to check
if something doesn't unexpectedly find its way in.
With changing requirements and changing authors, it is easy for
almost all of your assumptions and conventions to break. Having
an attribute is so much better than having to write a comment
and/or needing to be extra vigilant at code review time.
More information about the Digitalmars-d
mailing list