Re: accept <at> pure <at> nothrow <at> return attributes
Nick Treleaven via Digitalmars-d <digitalmars-d <at> puremagic.com>
2015-01-26 17:07:26 GMT
On 26/01/2015 11:39, Jonathan M Davis via Digitalmars-d wrote:
> In theory, the increased consistency is welcome, but the increased visual
> noise definitely is not. And if we leave in pure and nothrow without <at> ,
> then we're going to have code out there doing both, which adds to the
> confusion, and if we deprecate pure and nothrow without <at> , then we'll be
> forced to change pretty much every D program in existence.
Only if the deprecation became an error.
> 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 <at> .
Most of those also apply to variable members. pure, nothrow, return only
apply to functions.
I like this change, but it might be better if final, override and inout
gained <at> attribute syntax too. Then it would have more consistency.
Also the inverted-attribute option then doesn't need !ugly !sigils -
<at> impure vs <at> pure, <at> throw vs <at> nothrow, etc.
> In fact, priore to this, <at> safe,
> <at> trusted, <at> system, and <at> property were the_only_ function attributes with <at>
> on them.
There's also <at> disable and more recently, <at> nogc.