The Wrong Stuff

Simen kjaeraas simen.kjaras at gmail.com
Sat Sep 25 18:24:27 PDT 2010


Jonathan M Davis <jmdavisProg at gmx.com> wrote:

> That could be the case - I'd have to look at the grammar or parser to be  
> sure -
> but that would be a poor way to do it if you ever intended to have  
> user-defined
> attributes. Normally, @ would be in the grammar as a separate symbol  
> indicating
> that the symbol  immediately followed was an identifier which was an  
> attribute.
> It's quite possible, however, that @property is currently treated as a  
> single
> symbol which is a keyword. I doubt that it will stay that way in the  
> long term
> though, if it is the case.

It appears I have not made my stance on this clear - in my mind, anything
that is illegal to use as an identifier, but that is allowed to use in the
language, is a keyword (that is roughly my definition, at least). I don't
care whether the compiler uses this method or that to determine whether it
is a keyword. Perhaps it would be better to use the term 'reserved word'
to encompass both keywords and @tributes (the latter with the @-prefix
included).


-- 
Simen


More information about the Digitalmars-d mailing list