accept @pure @nothrow @return attributes
Nick Treleaven via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jan 27 09:18:12 PST 2015
On 27/01/2015 16:49, Jonathan M Davis via Digitalmars-d wrote:
> abstract also applies to classes, as does final.
Yes, but they actually only affect the *functions* belonging to the
class, not the variables. A class is not a variable.
> Also, if we end up adding
> any new attributes later, they're bound to have @ on them to avoid requiring
> a keyword (which is why we have @ on some of them in the first place), and
> if the new attribute applies to variables or types as well, then the
> division that you're suggesting falls apart.
It's inspired from the status quo - there are no @attributes that apply
to variables. __gshared uses underscores instead of @attribute syntax.
If we want to introduce a new attribute that applies to both functions
and variables, use __attribute.
More information about the Digitalmars-d
mailing list