Re: Forwards-compatible syntax proposal

2008-07-09 Thread Waldemar Horwat
I've had a request to repeat the example I showed at the meeting, so here's one: { if (false) { // Say we're introducing a new cast syntax '(expr) expr' var y = (int)/fo+/.exec(abcfoo); } push_the_button = false; { z = y/x; } } In ECMAScript parsing and lexing are

Re: Newly revised Section 10 for ES3.1.

2008-07-09 Thread Maciej Stachowiak
On Jul 9, 2008, at 5:16 PM, Allen Wirfs-Brock wrote: Const and function declarations within blocks must be uniquely named, such a declaration may not over-write a preceding declaration in the same block and an attempt to do so is a syntax error. Such declarations, of course, shadow any

Re: Newly revised Section 10 for ES3.1.

2008-07-09 Thread Mike Shaver
2008/7/9 Maciej Stachowiak [EMAIL PROTECTED]: Although the standard does not allow block-level function declarations I'd understood that, while ES3 didn't specify such declarations, it was not a violation of the standard to have them. I agree with your assessment of the compatibility impact,

Re: Newly revised Section 10 for ES3.1.

2008-07-09 Thread Garrett Smith
2008/7/9 Allen Wirfs-Brock [EMAIL PROTECTED]: I've just finished reworking section 10 to better accommodate block scoped function declarations and const statements. In the course of this I had to make various decisions about the semantics. The primary purpose of this message is to provide

Re: Newly revised Section 10 for ES3.1.

2008-07-09 Thread Mark S. Miller
Hi Maciej, IIUC, these examples work the same in Allen's proposal as the do in ES4. If this does break the web, doesn't ES4 have exactly the same problem? On Wed, Jul 9, 2008 at 6:33 PM, Maciej Stachowiak [EMAIL PROTECTED] wrote: On Jul 9, 2008, at 5:16 PM, Allen Wirfs-Brock wrote: Const

Re: Newly revised Section 10 for ES3.1.

2008-07-09 Thread Brendan Eich
On Jul 9, 2008, at 6:54 PM, Mark S. Miller wrote: On Wed, Jul 9, 2008 at 6:47 PM, Mike Shaver [EMAIL PROTECTED] wrote: 2008/7/9 Maciej Stachowiak [EMAIL PROTECTED]: Although the standard does not allow block-level function declarations I'd understood that, while ES3 didn't specify

Re: Newly revised Section 10 for ES3.1.

2008-07-09 Thread Brendan Eich
On Jul 9, 2008, at 6:58 PM, Mark S. Miller wrote: Hi Maciej, IIUC, these examples work the same in Allen's proposal as the do in ES4. If this does break the web, doesn't ES4 have exactly the same problem? The idea for ES4 was to change the meaning of function sub-statements only under

Re: Newly revised Section 10 for ES3.1.

2008-07-09 Thread Mark S. Miller
On Wed, Jul 9, 2008 at 7:02 PM, Brendan Eich [EMAIL PROTECTED] wrote: On Jul 9, 2008, at 6:58 PM, Mark S. Miller wrote: Hi Maciej, IIUC, these examples work the same in Allen's proposal as the do in ES4. If this does break the web, doesn't ES4 have exactly the same problem? The idea for

RE: Newly revised Section 10 for ES3.1.

2008-07-09 Thread Allen Wirfs-Brock
I completely agree, chapter 16 needs to carry forward. We don't want to forbid implementations from experimenting with future extensions. When there has been broad agreement across major implements on an extension (including the full semantics), I think it makes sense to standardize that

Re: Newly revised Section 10 for ES3.1.

2008-07-09 Thread Brendan Eich
On Jul 9, 2008, at 10:05 PM, Allen Wirfs-Brock wrote: I’m also confused about this. My understanding was, other than perhaps some of the details I was specifically looking for feedback on, that what I specified was generally what ES4 was planning on doing. See my reply to Mark citing

RE: Newly revised Section 10 for ES3.1.

2008-07-09 Thread Allen Wirfs-Brock
There was two parts to may message, an informal overview of the proposed semantics and the excerpt from the actual formal (and I use that term advisedly) specification of the semantics. I was using the term top-level in the informal part of the message to refer to code that wasn't in a nested