RFC: DIP draft for "Compiler-defined Attribute Consistency"

Alexandru Ermicioi alexandru.ermicioi at gmail.com
Fri Jul 16 09:06:26 UTC 2021

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 
Another example: @deprecated("See xxx for this functionality")

Best regards,

More information about the Digitalmars-d mailing list