RFC: DIP draft for "Compiler-defined Attribute Consistency"
Petar
Petar
Fri Jul 16 09:45:19 UTC 2021
On Friday, 16 July 2021 at 09:06:26 UTC, Alexandru Ermicioi wrote:
> On Wednesday, 14 July 2021 at 15:01:05 UTC, Rune Morling wrote:
>> Hi All,
>> ...
>> Comments very welcome.
>
> What about making those attributes not just prefixed with @,
> but fully fledged UDA?
> From the point of view of compile time code this would remove
> the necessity in strange syntax for is expression to get them.
> You'd just fetch them as any other uda.
> Also this will allow us to extend these attributes with fields!
> Say for example: @safe(disabled.yes)
> Older compiler would just ignore this, but newer could take
> hints and other additional info defined on these udas for
> better optimization, or improved checks, or just for
> informational purposes.
> Another example: @deprecated("See xxx for this functionality")
>
> Best regards,
> Alexandru.
I absolutely agree! I started writing a longer post on exactly
this topic, but you beat me to it :P
More information about the Digitalmars-d
mailing list