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

Alexandru Ermicioi alexandru.ermicioi at gmail.com
Fri Jul 16 08:54:34 UTC 2021


On Friday, 16 July 2021 at 06:47:57 UTC, bauss wrote:
> On Wednesday, 14 July 2021 at 16:02:01 UTC, Andrea Fontana 
> wrote:
>> On Wednesday, 14 July 2021 at 15:54:06 UTC, user1234 wrote:
>>>> Comments very welcome.
>>
>> I don't like that @attr is colliding with UDA.
>> It would be nice to have # for attr and @ for uda (or 
>> viceversa).
>
> I would rather have seen built-in attributes having no prefix 
> ex. just safe, nogc etc.
>
> Basically the opposite of making the rest of the attributes 
> having @ too.

Making them have @ prefix would allow to make them a simple uda 
defined in druntime, which the compiler then would check for them 
and apply extra requirements over them.
Imho, this would actually simplify compiler code.

- Alexandru


More information about the Digitalmars-d mailing list