Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Reserved keyword policy

0 views
Skip to first unread message

Hannes Wallnoefer

unread,
Oct 16, 2008, 7:11:33 AM10/16/08
to
I just discovered that the reserved keyword policy in Spidermonkey has
become much more relaxed in recent years. It looks like future
reserved keywords (mostly Java keywords) can now be used
unrestrictedly except for those that are actually used, such as
"const", "debugger", or "import":

https://bugzilla.mozilla.org/show_bug.cgi?id=240317

And even actual keywords can now be used in places where they can
unambiguously be identified as property identifiers. I found a number
of bugs for this:

https://bugzilla.mozilla.org/show_bug.cgi?id=336376
https://bugzilla.mozilla.org/show_bug.cgi?id=343675
https://bugzilla.mozilla.org/show_bug.cgi?id=345922
https://bugzilla.mozilla.org/show_bug.cgi?id=379566

The current state with Rhino is that future reserved keywords can be
freed by setting FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER to true, but
you get a warning message for each occurrence so it's not really
usable. To match Spidermonkey, I think we should set the default value
for FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER to true and remove the
warning message.

Also, "export" and "import" are not currently covered by the
FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER option, although they don't
have any meaning in Rhino. They are used for some arcane, non-standard
feature in Spidermonkey, but I don't think we should reflect that in
Rhino. They'd be really valuable for implementing module functionality
in Helma NG, so including them in the reserved keyword group would be
really really great.

Any opinions?

Hannes

0 new messages