Re: Comments on Refutable Patterns proposal

2013-03-21 Thread Brendan Eich
Brandon Benvie wrote: On 3/21/2013 10:54 AM, Tab Atkins Jr. wrote: On Thu, Mar 21, 2013 at 10:51 AM, Brandon Benvie wrote: On 3/21/2013 10:14 AM, Axel Rauschmayer wrote: And with rest patterns at the end only, I don't think you'd ever want to write "..." without a subpattern. The only differe

RE: Unicode Escape sequences for keywords, what's the correct behaviour?

2013-03-21 Thread BelleveInvis
Hm, Maybe I should establish an issue for Chrome, instead of IE. Thanks. Subject: Re: Unicode Escape sequences for keywords, what's the correct behaviour? From: al...@wirfs-brock.com Date: Thu, 21 Mar 2013 08:41:35 -0700 CC: es-discuss@mozilla.org To: infinte.c...@hotmail.com As a keyword. T

RE: Unicode Escape sequences for keywords, what's the correct behaviour?

2013-03-21 Thread BelleveInvis
> Subject: Re: Unicode Escape sequences for keywords, what's the correct > behaviour? > From: al...@wirfs-brock.com > Date: Thu, 21 Mar 2013 08:41:35 -0700 > CC: es-discuss@mozilla.org > To: infinte.c...@hotmail.com > > As a keyword. > > This is clarified i

Re: Mutable Proto

2013-03-21 Thread Andrea Giammarchi
On Wed, Mar 20, 2013 at 10:18 PM, Brendan Eich wrote: > Your writing is unclear and overlong, and full of unjustified airs of > grievance -- please work on it. I'll do more than that, I publicly and officially apologies for my writing plus I will step back from this ML for an undefined amount o

Re: Mutable Proto

2013-03-21 Thread Kevin Reid
Correction: On Thu, Mar 21, 2013 at 2:16 PM, Kevin Reid wrote: > Yes. SES requires 'with' as a means to hook into 'global' variable reads > and writes; without it, it is impossible without performing a parse and scope analysis of the code to be evaluated > to emulate the semantics of browser

Re: Mutable Proto

2013-03-21 Thread Brendan Eich
Brandon Benvie wrote: On 3/21/2013 1:57 PM, Brendan Eich wrote: No 'with' required for SES AFAIK. Do you have a code.google.com link? Cc'ing Mark in case he is not reading es-discuss frequently. First, it doesn't matter: my point about SES being deployed in the real world stands, whether SES

Re: Mutable Proto

2013-03-21 Thread Mark S. Miller
On Thu, Mar 21, 2013 at 10:04 PM, Brandon Benvie wrote: > On 3/21/2013 1:57 PM, Brendan Eich wrote: > >> No 'with' required for SES AFAIK. Do you have a code.google.com link? >> Cc'ing Mark in case he is not reading es-discuss frequently. >> > Thanks. >>> If I understand correctly, this wrapper

Re: Mutable Proto

2013-03-21 Thread Brandon Benvie
On 3/21/2013 1:57 PM, Brendan Eich wrote: No 'with' required for SES AFAIK. Do you have a code.google.com link? Cc'ing Mark in case he is not reading es-discuss frequently. /be Brandon Benvie wrote: On 3/21/2013 11:39 AM, Brendan Eich wrote: Andrea Giammarchi wrote: yes, SES, the non real wo

Re: Mutable Proto

2013-03-21 Thread Brendan Eich
No 'with' required for SES AFAIK. Do you have a code.google.com link? Cc'ing Mark in case he is not reading es-discuss frequently. /be Brandon Benvie wrote: On 3/21/2013 11:39 AM, Brendan Eich wrote: Andrea Giammarchi wrote: yes, SES, the non real world out there, needs __proto__ ... shenani

Re: Module Interop

2013-03-21 Thread Kevin Smith
> > Ideally, everything will "just work", so that legacy modules can be used > transparently alongside ES6 modules. > > I disagree with this premise. It shouldn't be ES6's responsibility to > auto-detect historical non-ES6 systems. Of course, I tend to agree with your disagreement : ) But in any

Re: Module Interop

2013-03-21 Thread Kevin Smith
> - look for a special comment at the beginning > For backward compat, you'd have to put the comment in new ES6 modules. That's a spank-belt worse than "use strict" ; ) > - look at the module name > import "npm/moment" as moment; > This is a good option, but it's not transparent. If you u

Re: Module Interop

2013-03-21 Thread David Herman
On Mar 21, 2013, at 12:25 PM, Kevin Smith wrote: > Ideally, everything will "just work", so that legacy modules can be used > transparently alongside ES6 modules. I disagree with this premise. It shouldn't be ES6's responsibility to auto-detect historical non-ES6 systems. If you want to build

Re: Mutable Proto

2013-03-21 Thread Jason Orendorff
On Thu, Mar 21, 2013 at 2:38 AM, François REMY < francois.remy@outlook.com> wrote: > Phasing out failed experiments *is* possible. I don't think a browser that > doesn't support or or even document.layers would have a > lot of problems to view the web as it's now, yet I remember a time where

Re: Module Interop

2013-03-21 Thread Jason Orendorff
On Thu, Mar 21, 2013 at 12:25 PM, Kevin Smith wrote: > The problem is that the `options.metadata === "node"` test is > hand-waiving. In a mixed environment where a module may be an ES6 module > or a legacy Node module, how is the loader supposed to know how to link it? > Ideally, everything wil

Module Interop

2013-03-21 Thread Kevin Smith
Referencing the presentation at http://wiki.ecmascript.org/doku.php?id=meetings:meeting_mar_12_2013. The module loader proposal outlined in the presentation is looking pretty solid. However, there is a weakness which I would like to point out. The primary change in this proposal is a "link" hook

Re: Mutable Proto

2013-03-21 Thread Brandon Benvie
On 3/21/2013 11:39 AM, Brendan Eich wrote: Andrea Giammarchi wrote: yes, SES, the non real world out there, needs __proto__ ... shenanigans all over the world because of '__proto__' ain't important. SES is deployed on major Google properties. I recall also Yahoo! but not sure if still up. I

Re: Mutable Proto

2013-03-21 Thread Brendan Eich
Andrea Giammarchi wrote: yes, SES, the non real world out there, needs __proto__ ... shenanigans all over the world because of '__proto__' ain't important. SES is deployed on major Google properties. I recall also Yahoo! but not sure if still up. I think again you are out of line. Am I wrong

Re: Comments on Refutable Patterns proposal

2013-03-21 Thread Brandon Benvie
On 3/21/2013 10:54 AM, Tab Atkins Jr. wrote: On Thu, Mar 21, 2013 at 10:51 AM, Brandon Benvie wrote: On 3/21/2013 10:14 AM, Axel Rauschmayer wrote: And with rest patterns at the end only, I don't think you'd ever want to write "..." without a subpattern. The only difference between [x, y] and

Re: Comments on Refutable Patterns proposal

2013-03-21 Thread Axel Rauschmayer
>> Ah! I would expect [x,y] to only match arrays whose length is 2. Is there a >> benefit to being more lenient? > I wouldn't expect that at all, for the same reason I would expect `let { x, y > } = { x: 1, y: 2, z: 3 }` to work. I’m influenced by Prolog that has [x,y] and [x,y | rest]. Matching

Re: Comments on Refutable Patterns proposal

2013-03-21 Thread Tab Atkins Jr.
On Thu, Mar 21, 2013 at 10:51 AM, Brandon Benvie wrote: > On 3/21/2013 10:14 AM, Axel Rauschmayer wrote: >>> And with rest patterns at the end only, I don't think you'd ever want >>> to write "..." without a subpattern. The only difference between [x, >>> y] and [x, y, ...] would be that the latte

Re: Comments on Refutable Patterns proposal

2013-03-21 Thread Brandon Benvie
On 3/21/2013 10:14 AM, Axel Rauschmayer wrote: And with rest patterns at the end only, I don't think you'd ever want to write "..." without a subpattern. The only difference between [x, y] and [x, y, ...] would be that the latter (somewhat redundantly) checks the presence of a length property.

Re: Comments on Refutable Patterns proposal

2013-03-21 Thread Axel Rauschmayer
> Yeah, rest patterns in other places were already decided out of scope > for ES6 a while ago. And I did not include them here either because it > is far from clear what a reasonable semantics should be for all kinds > of corner cases. Just consider: > > let [a, b, c, ...middle, x, y, z] = {'0':

Re: Dynamic Modules Questions

2013-03-21 Thread Erik Arvidsson
On Thu, Mar 21, 2013 at 12:22 PM, Aymeric Vitte wrote: > Does Module support the structured cloning ? (ie can you store M in > indexedDB for example ?) > I don't see how that would be possible since functions cannot be cloned. Functions may reference things in its lexical context. -- erik _

Re: Dynamic Modules Questions

2013-03-21 Thread Aymeric Vitte
Le 06/03/2013 23:31, Sam Tobin-Hochstadt a écrit : >2) What is the nature of the bindings created with the Module constructor? >In the following scenario, what is output? > > var a = 123; > var M = new Module({ a: a }); > > a = 456; > console.log(M.a === a); // bound to "var a"

Re: Unicode Escape sequences for keywords, what's the correct behaviour?

2013-03-21 Thread Allen Wirfs-Brock
As a keyword. This is clarified in the ES6 draft (http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.6.1 ) Allen On Mar 21, 2013, at 3:04 AM, BelleveInvis wrote: > If a keyword represented as unicode escape sequences, should it interpreted > as identifier or keyword? > > Example co

Re: Comments on Refutable Patterns proposal

2013-03-21 Thread Andreas Rossberg
On 21 March 2013 00:04, Axel Rauschmayer wrote: > http://wiki.ecmascript.org/doku.php?id=harmony:refutable_matching > > - Would love to see examples for arrays. Especially if there are more > element patterns (lhs) than array elements (rhs). Good point. I added some. > - Possible future extensio

Re: FW: Unicode Escape sequences for keywords, what's the correct behaviour?

2013-03-21 Thread gaz Heyes
On 21 March 2013 10:04, BelleveInvis wrote: > If a keyword represented as unicode escape sequences, should it > interpreted as identifier or keyword? > > Example code: > > \u0076\u0061\u0072 a > > Should it throw a syntax error? > Get even more confusing when you assign to it :D tru\u0065=1

Re: FW: Unicode Escape sequences for keywords, what's the correct behaviour?

2013-03-21 Thread Andreas Rossberg
On 21 March 2013 11:04, BelleveInvis wrote: > If a keyword represented as unicode escape sequences, should it interpreted > as identifier or keyword? > > Example code: > > \u0076\u0061\u0072 a > > Should it throw a syntax error? Not entirely clear. There is a bug for it: https://bugs.ecmasc

Re: Sandboxing and parsing jQuery in 100ms

2013-03-21 Thread gaz Heyes
Hi all I thought I'd share an update of my mental js work. I have since reduced the parse time of mental and now added a DOM sandbox that uses ES5 to allow safe manipulation of the DOM. This is so cool because it means that mental can take control over your dom and then we can choose what we allow

FW: Unicode Escape sequences for keywords, what's the correct behaviour?

2013-03-21 Thread BelleveInvis
If a keyword represented as unicode escape sequences, should it interpreted as identifier or keyword? Example code:      \u0076\u0061\u0072 a Should it throw a syntax error? ___ es-discuss mailing list es-dis

RE: Mutable Proto

2013-03-21 Thread François REMY
> If against all odds, all code everywhere *did* magically drop __proto__ > in favor of Object.setPrototypeOf, then SES and similar subsets would be > unable to protect secure code from ambient Object.setPrototypeOf usage > from the insecure side on the secure side's objects, unless > Object.setPro