Re: should we rename the Program grammar production?

2012-10-11 Thread David Herman
One of the pieces of awkward ES specification terminology has been the use of the word Program as the name for a global top-level StatementList. A ES Program is commonly only a single fragment of what most of us commonly think of as a program. I agree. I proposed that we replace Program

Re: should we rename the Program grammar production?

2012-10-11 Thread David Herman
On Oct 10, 2012, at 4:20 PM, Rick Waldron waldron.r...@gmail.com wrote: -1 Script might be the most common execution context, but there is more then one of those to consider. I think Program is just the right amount of neutral. This doesn't address Allen's point, though, which is that a

Re: Membranes, unmediated access to objects through Object.getPrototypeOf

2012-10-11 Thread Tom Van Cutsem
2012/10/11 Brendan Eich bren...@mozilla.org Why would not the target be nulled and the handler be replaced with a handler full of throwing traps? Sorry if I missed a message on this. Yes, that's the general idea. It's just that you need some built-in function to do this for you. We need

Re: Membranes, unmediated access to objects through Object.getPrototypeOf

2012-10-11 Thread Brendan Eich
Tom Van Cutsem wrote: - Proxy.revocable returns a tuple {proxy, revoke}. While more cumbersome to work with (especially in pre-ES6 code without destructuring), this API gets the authority to revoke a proxy exactly right: at proxy birth, only the creator of the proxy holds the right to revoke

Re: Membranes, unmediated access to objects through Object.getPrototypeOf

2012-10-11 Thread Andreas Rossberg
On 11 October 2012 09:32, Brendan Eich bren...@mozilla.org wrote: Tom Van Cutsem wrote: - Proxy.revocable returns a tuple {proxy, revoke}. While more cumbersome to work with (especially in pre-ES6 code without destructuring), this API gets the authority to revoke a proxy exactly right: at

Re: Membranes, unmediated access to objects through Object.getPrototypeOf

2012-10-11 Thread Mark S. Miller
On Thu, Oct 11, 2012 at 4:25 AM, Andreas Rossberg rossb...@google.comwrote: On 11 October 2012 09:32, Brendan Eich bren...@mozilla.org wrote: Tom Van Cutsem wrote: - Proxy.revocable returns a tuple {proxy, revoke}. While more cumbersome to work with (especially in pre-ES6 code without

Re: Membranes, unmediated access to objects through Object.getPrototypeOf

2012-10-11 Thread Andreas Rossberg
On 11 October 2012 13:41, Mark S. Miller erig...@google.com wrote: On Thu, Oct 11, 2012 at 4:25 AM, Andreas Rossberg rossb...@google.com wrote: On 11 October 2012 09:32, Brendan Eich bren...@mozilla.org wrote: Tom Van Cutsem wrote: - Proxy.revocable returns a tuple {proxy, revoke}. While

Re: Membranes, unmediated access to objects through Object.getPrototypeOf

2012-10-11 Thread David Bruant
2012/10/11 Andreas Rossberg rossb...@google.com On 11 October 2012 09:32, Brendan Eich bren...@mozilla.org wrote: Tom Van Cutsem wrote: - Proxy.revocable returns a tuple {proxy, revoke}. While more cumbersome to work with (especially in pre-ES6 code without destructuring), this API

Re: Function.length and Default Parameters

2012-10-11 Thread Patrick Mueller
On Wed, Oct 10, 2012 at 1:22 PM, Kevin Smith khs4...@gmail.com wrote: We've discussed this extensively before and there doesn't seem to be many plausible use cases for the function length property. Here's the only use case that I've encountered (admittedly not particularly strong):

Re: should we rename the Program grammar production?

2012-10-11 Thread John J Barton
On Wed, Oct 10, 2012 at 4:20 PM, Rick Waldron waldron.r...@gmail.com wrote: ... Allen Wirfs-Brock wrote: I proposed that we replace Program in this context with Script. This is much less confusing and matches the most common manifestation of an ES Program as an HTML script block. +1 --

Re: should we rename the Program grammar production?

2012-10-11 Thread Andreas Rossberg
On 11 October 2012 17:49, John J Barton johnjbar...@johnjbarton.com wrote: Script is not neutral but neither is Program plus it's just wrong. The language needs a name for both the unit of compilation and the assembly of those units. The latter is a program right? So the former needs a

Re: Membranes, unmediated access to objects through Object.getPrototypeOf

2012-10-11 Thread Tom Van Cutsem
2012/10/11 Andreas Rossberg rossb...@google.com On 11 October 2012 13:41, Mark S. Miller erig...@google.com wrote: How does the target get dropped? Remember, this all started with David's observation that without some additional magic, we have an unsolvable GC problem. This is still true.

Re: Membranes, unmediated access to objects through Object.getPrototypeOf

2012-10-11 Thread Mark S. Miller
On Thu, Oct 11, 2012 at 10:26 AM, Tom Van Cutsem tomvc...@gmail.com wrote: 2012/10/11 Andreas Rossberg rossb...@google.com On 11 October 2012 13:41, Mark S. Miller erig...@google.com wrote: How does the target get dropped? Remember, this all started with David's observation that without

Re: should we rename the Program grammar production?

2012-10-11 Thread Brendan Eich
John J Barton wrote: That is not my understanding, but I don't think it matters: that is an implementation specific notion without consequence. Whether the compiler treats all of the top level statements of ascript tag individually or separately cannot influence the result. No, this ignores

Re: should we rename the Program grammar production?

2012-10-11 Thread John J Barton
On Thu, Oct 11, 2012 at 11:03 AM, Brendan Eich bren...@mozilla.com wrote: John J Barton wrote: That is not my understanding, but I don't think it matters: that is an implementation specific notion without consequence. Whether the compiler treats all of the top level statements of ascript tag

Re: should we rename the Program grammar production?

2012-10-11 Thread Brendan Eich
John J Barton wrote: On Thu, Oct 11, 2012 at 11:03 AM, Brendan Eichbren...@mozilla.com wrote: John J Barton wrote: That is not my understanding, but I don't think it matters: that is an implementation specific notion without consequence. Whether the compiler treats all of the top level

Re: Function.length and Default Parameters

2012-10-11 Thread Kevin Smith
express for node already does this, for error handlers: http://expressjs.com/guide.html#error-handling express is very popular; #4 on Most Depended Upon packages; #1 on Most Starred at npm: This is helpful. So, judgement aside, we can say there is a certain level of usage of

Re: Function.length and Default Parameters

2012-10-11 Thread Brendan Eich
Kevin Smith wrote: express for node already does this, for error handlers: http://expressjs.com/guide.html#error-handling express is very popular; #4 on Most Depended Upon packages; #1 on Most Starred at npm: This is helpful. So, judgement aside, we can say there is a

Re: Function.length and Default Parameters

2012-10-11 Thread Rick Waldron
On Thursday, October 11, 2012 at 7:36 PM, Kevin Smith wrote: express for node already does this, for error handlers: http://expressjs.com/guide.html#error-handling express is very popular; #4 on Most Depended Upon packages; #1 on Most Starred at npm: This is

Re: Function.length and Default Parameters

2012-10-11 Thread Kevin Smith
And specifically not stopping counting at the first parameter with a default value, right? Yep. Would it also work for this use case to stop counting at the first parameter with no default value, after which there are only defaults? function f(a, b = 2, c, d = 4, ...rest) {} f.length

Modular At-Names

2012-10-11 Thread Kevin Smith
Hi all, ES6 is shaping up quite nicely. The last big area which I feel is still quite foggy is syntactic support for symbolic property names, which Allen has addressed with his at-names proposal. Perhaps syntax won't make it into ES6 regardless of the work we do, but I think the symbol story