Update on ES3.1 block scoped function declarations

2008-07-10 Thread Allen Wirfs-Brock
We discussed these issues at today's ES3.1 conference call and arrived at a new plan of record: 1) We concluded that the present diversity of semantics of block nested function declarations among browser implementations probably cannot be replaced with a standard semantics without significant

Re: Update on ES3.1 block scoped function declarations

2008-07-10 Thread Mark S. Miller
On Thu, Jul 10, 2008 at 11:05 AM, Brendan Eich [EMAIL PROTECTED] wrote: So what would this program print in ES3.1? const C = 42; function f(x, y) { const C = 33; if (x) { const C = 21; return eval(y); } return C; } print(f(true, C)); 21 What does it print in

RE: Update on ES3.1 block scoped function declarations

2008-07-10 Thread Allen Wirfs-Brock
PROTECTED] On Behalf Of Brendan Eich Sent: Thursday, July 10, 2008 1:45 PM To: Mark S. Miller Cc: [EMAIL PROTECTED]; es4-discuss@mozilla.org; Herman Venter Subject: Re: Update on ES3.1 block scoped function declarations On Jul 10, 2008, at 1:28 PM, Mark S. Miller wrote: On Thu, Jul 10, 2008 at 11:05

Re: Update on ES3.1 block scoped function declarations

2008-07-10 Thread Brendan Eich
On Jul 10, 2008, at 2:03 PM, Brendan Eich wrote: On Jul 10, 2008, at 1:58 PM, Allen Wirfs-Brock wrote: Maybe, I’m missing something subtle, but 21 is clearly the right answer and is what I believe is specified by the version of section 10 that I sent out yesterday regardless of the scoping

RE: Update on ES3.1 block scoped function declarations

2008-07-10 Thread Allen Wirfs-Brock
PROTECTED] On Behalf Of Brendan Eich Sent: Thursday, July 10, 2008 1:45 PM To: Mark S. Miller Cc: [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]; es4-discuss@mozilla.orgmailto:es4-discuss@mozilla.org; Herman Venter Subject: Re: Update on ES3.1 block scoped function declarations On Jul 10, 2008, at 1:28

Re: Update on ES3.1 block scoped function declarations

2008-07-10 Thread Mark S. Miller
On Thu, Jul 10, 2008 at 2:51 PM, Allen Wirfs-Brock [EMAIL PROTECTED] wrote: I see, yes there is a potential eval tax. If I thought this was really a concern (and as you say, we already have the issue for catch and such) I'd be more inclined to fiddling with the scoping rule of eval rather

Re: Update on ES3.1 block scoped function declarations

2008-07-10 Thread Maciej Stachowiak
On Jul 10, 2008, at 3:28 PM, Mark S. Miller wrote: On Thu, Jul 10, 2008 at 2:51 PM, Allen Wirfs-Brock [EMAIL PROTECTED] wrote: I see, yes there is a potential eval tax. If I thought this was really a concern (and as you say, we already have the issue for catch and such) I'd be more

Re: Update on ES3.1 block scoped function declarations

2008-07-10 Thread Brendan Eich
On Jul 10, 2008, at 3:28 PM, Mark S. Miller wrote: On Thu, Jul 10, 2008 at 2:51 PM, Allen Wirfs-Brock Allen.Wirfs- [EMAIL PROTECTED] wrote: I see, yes there is a potential eval tax. If I thought this was really a concern (and as you say, we already have the issue for catch and such) I'd be

Re: Update on ES3.1 block scoped function declarations

2008-07-10 Thread Waldemar Horwat
Brendan, You're beating a dead horse here. If this call to eval is allowed, the only reasonable answer is 21. All that means is that you must be able to recreate the bindings if the function uses eval. Unless you're proposing to take block-scoped declarations out of ES4, what's the harm

Re: Update on ES3.1 block scoped function declarations

2008-07-10 Thread Brendan Eich
On Jul 10, 2008, at 6:08 PM, Waldemar Horwat wrote: Brendan, You're beating a dead horse here. Sorry, no -- the question of whether and how much of ES4 is pulled into ES3.1, requiring costly and untestable work within the framework of the ES3 spec, is a live one, and it should be for