accept @pure @nothrow @return attributes

Francesco Cattoglio via Digitalmars-d digitalmars-d at puremagic.com
Mon Jan 26 05:00:55 PST 2015


On Monday, 26 January 2015 at 11:39:23 UTC, Jonathan M Davis 
wrote:
> But It's not like this really improves consistency all that 
> much anyway,
> because public, protected, package, private, final, override, 
> static, const,
> immutable, inout, and deprecated all don't have @. So, most 
> function
> attributes _don't_ have @ on them, and we just added @ to some 
> of them,
> making things even _less_ consistent. In fact, priore to this, 
> @safe,
> @trusted, @system, and @property were the _only_ function 
> attributes with @
> on them. So, if we really wanted to improve consistency IMHO, 
> we'd get rid
> of @ from everything that's built-in and leave it for 
> user-defined
> attributes, but that would break existing code too.
> - Jonathan M Davis

At this point, it might be nicer to have only attributes that 
exists as C++ keywords not having the @ identifier before them.
That is: public, protected, private, override, deprecated, static 
and const.

But this probably doesn't make much sense now, does it?


More information about the Digitalmars-d mailing list