[First Draft] Add @gc as a Function Attribute

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Sun Jun 16 08:26:26 UTC 2024


On 16/06/2024 8:13 PM, ryuukk_ wrote:
> Why couldn't attributes accept a parameter, perhaps a flag
> 
> |@gc(:yes | :local)|

Right now we have yes/no, infer(red)/explicit bit fields for some flags.

The only attribute that we've had consistent desire to have local for is 
``@nogc`` it doesn't need to be supported for all.

As positive/negative state of an annotate are both common things, it 
should take minimal characters to represent, in this case a single 
additional ``!``.

So I don't think we need to over complicate it by introducing parameters 
to any attributes other than for the throws set and thats only because 
we need to be able to represent what a value type exception style 
exceptional handling mechanism would be returning in the type system.


More information about the dip.development mailing list