accept @pure @nothrow @return attributes
Jonathan Marler via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jan 27 10:01:02 PST 2015
On Tuesday, 27 January 2015 at 17:18:11 UTC, Nick Treleaven wrote:
> 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.
>
I think you may have missed the point. I believe what Jonathan
is saying is that if you turn abstract into @abstract then you
have to consider how to solve the "abstract class" issue. Do you
change it to:
@abstract class ?
Same thing with final. Since the same keywords are used in a lot
of different contexts, if you change how it is used in one
context then it's going to be inconsistent with how it's used in
the other contexts (like with a function or a class). Then if
you want consistency (which is the point of why we are discussing
this change in the first place) you have to change every context
it is used in. If you follow through with your proposal, you'll
end up putting a '@' character before almost every keyword in the
language which has no benefit since the '@' symbol serves no
useful purpose to the compiler in the first place (on a keyword
at least).
More information about the Digitalmars-d
mailing list