Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?

Iain Buclaw ibuclaw at ubuntu.com
Tue Dec 18 07:19:57 PST 2012


Now that UDA's have extended their support to @attribute

https://github.com/D-Programming-Language/dmd/commit/0814f9decfdbcef644c4e89b02b8be192ed2e900


Should we take this as an opportunity for other compiler 
maintainers to implement their own compiler-specific predefined 
attributes?


Example:

Where GDC has the following to allow developers to mark functions 
with the backend attribute 'noreturn'.

pragma(attribute, noreturn)
void die()
{
    abort();
}


Potentially this can now be re-written as.

void die() @noreturn
{
    abort();
}


Would you guys stand for such a change to be allowed?

Thanks,
Iain.


More information about the Digitalmars-d mailing list