[First Draft] Add @gc as a Function Attribute

ryuukk_ ryuukk.dev at gmail.com
Sun Jun 16 08:13:33 UTC 2024


On Friday, 14 June 2024 at 16:38:09 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
> On 15/06/2024 4:20 AM, 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.
>
> At some point I wanted to do a DIP that ensured all attributes 
> had a positive form, a common negated syntax ``@!identifier``, 
> changed throwing to be set based ``@throws(...)`` and add 
> ``@notls``, ``@localnogc``.
>
> So I'm in support of this proposal, but it doesn't go anywhere 
> near where it needs to in terms of scope.
>
> You're welcome to do the proposal instead as I'm busy on other 
> things atm if it interests you.

Why couldn't attributes accept a parameter, perhaps a flag

`@gc(:yes | :local)`


More information about the dip.development mailing list