[First Draft] Add @gc as a Function Attribute

Dom DiSc dominikus at scherkl.de
Tue Jun 18 16:26:52 UTC 2024


On Monday, 17 June 2024 at 22:01:18 UTC, Mathias Lang wrote:
> On Friday, 14 June 2024 at 16:20:02 UTC, Quirin Schroll wrote:
>> Permalink: 
>> https://github.com/Bolpat/DIPs/blob/8a26c2545b0a6926d799e9d8dc8c3662e58d516b/DIPs/DIP-4NNN-QFS.md
>>
>> ---
>>
>> **Abstract:** Add `@gc` as a new function attribute that acts 
>> as the inverse of the `@nogc` attribute.
>
> The rationale is very weak. If the only use case is to support 
> bad usage of `@attribute:` or `@attribute {}`, there is no 
> benefit at all to this.

I don't think so.
If a program is all @nogc except a single function (or even a 
unittest), using @nogc: is plausible. I wouldn't call this "bad 
usage".
But at the moment there is no way to mark this single test as 
"not @nogc". I find this situation annoying.
The same problem arises with pure:


More information about the dip.development mailing list