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:>
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")
I absolutely agree! I started writing a longer post on exactly this topic, but you beat me to it :P