On Jan 18, 2009, at 5:48 PM, Mark S. Miller wrote:

On Sun, Jan 18, 2009 at 4:35 PM, Brendan Eich <[email protected]> wrote:

We also allow keywords as property names in JS1.7+ and did for ES4 -- this relaxation from current context-free reservation of identifiers has been talked about for 3.1 too, and IIRC it was agreed to for Harmony at last summer's Oslo meeting.

It's in the ES3.1 grammar. In ES3.1, x.if is equivalent to x['if'], and ({if: x}) is equivalent to ({'if': x}).

The other unreserved context in JS1.7 and later is after the 'function' keyword. Unambiguous, complementary, useful for some cases. It's easy to tweak ES3.1's grammar to allow keywords in this context too. Thoughts?

/be
_______________________________________________
Es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to