keywords considered harmful
# Francis Cheng (18 years ago)
There are two categories of reserved words: ReservedIdentifiers and ContextuallyReservedIdentifiers. The former are completely reserved, whereas the latter are reserved in specific contexts but are otherwise not reserved.
For example, 'static' is a contextually reserved word, so you should be able to use it as a property name.
See the complete list here: developer.mozilla.org/es4/proposals/reserved_words.html
Actually, that list, which has about 49 ReservedIdentifiers and 15 ContextuallyReservedIdentifiers, is a little outdated. Currently the ReservedIdentifiers number in the low 30s and the ContextuallyReservedIdentifiers number in the mid 40s.
Francis
We have an awful lot of keywords. Has any thought been given to not
reserving them outright?
A user today complained that they cannot have a property 'static'.
(I suggested they change it to 'notdynamic'. :P)
But static is really only used as an adjective in a couple of places
in the language. So why do we have to ban it completely as an
identifier?
What am I missing?