On Saturday 25 September 2010 03:28:35 Simen kjaeraas wrote: > Torarin <torar...@gmail.com> wrote: > > 2010/9/24 Jonathan M Davis <jmdavisp...@gmx.com>: > >> However, we're not going to double the number of keywords that we have, > >> and the > >> @ syntax has allowed us to remove some keywords and will allow us to > >> add more > >> stuff later without having to add keywords. > > > > Why are attributes not considered keywords? Because the compiler > > doesn't care about them? > > Mostly because normal keywords eat up valid identifiers, while @tributes > don't. That said, @tributes are of course keywords too.
No they're not. Go look at the list of keywords in TDPL. property, for instance, is not a keyword. Part of the point of attributes was to make it so that they weren't keywords and therefore didn't make the list of keywords any longer. An attribute can't both not eat up valid identifiers and be a keyword at the same time. Attributes are parsed like variable names and are not considered special by the grammar. Now, there are currently on a fixed set of properties recognized by the compiler, and user-defined attributes don't yet exist, but they aren't keywords. - Jonathan M Davis