Should compilers take advantage (abuse) of the new UDA syntax that has been accepted?
Adam D. Ruppe
destructionator at gmail.com
Tue Dec 18 07:29:18 PST 2012
On Tuesday, 18 December 2012 at 15:19:58 UTC, Iain Buclaw wrote:
> Should we take this as an opportunity for other compiler
> maintainers to implement their own compiler-specific predefined
> attributes?
I think it'd be great if we used magical full names, but
otherwise it is the same as the library. Then they are namespaced
and can be shared.
module core.gdc;
struct noreturn {}
// and whatever
Then when you use it, you import core.gdc and use @noreturn. The
compiler doesn't define the attribute, but it recognizes the full
name of core.gdc.noreturn and gives it special treatment like an
intrinsic.
More information about the Digitalmars-d
mailing list