On Tue, 13 Dec 2011 03:50:13 -0500, Manu <[email protected]> wrote:
On 13 December 2011 09:53, Jonathan M Davis <[email protected]> wrote:
On Tuesday, December 13, 2011 07:28:18 F i L wrote:
> Can someone please explain why @property and @disabled have a '@'
> symbol in front of them?
So that they don't have to be keywords.
What is the rule for use of '@'?
It does feel inconsistent to me too...
@word are attributes. Attributes were added late to the D language in order to
minimize the effects of adding new keywords, so there are some keywords (i.e.
pure) that might have been considered for attribute status had they been
incorporated after attributes were available. At one point in time, user
defined attributes were to be allowed but that's still on the enhancement list.
We haven't gone back and normalized the older keywords as that would result in
the pointless breaking of existing code.