keywords considered harmful
Francis Cheng
fcheng at adobe.com
Fri May 25 16:16:48 PDT 2007
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:
http://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
-----Original Message-----
From: es4-discuss-bounces at mozilla.org
[mailto:es4-discuss-bounces at mozilla.org] On Behalf Of P T Withington
Sent: Friday, May 25, 2007 10:30 AM
To: es4-discuss
Subject: keywords considered harmful
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?
_______________________________________________
Es4-discuss mailing list
Es4-discuss at mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss
More information about the Es4-discuss
mailing list