Re: Security Demands Simplicity (was: Private Slots)

2013-01-18 Thread Brendan Eich
Domenic Denicola wrote: If we’re making up new syntax, I think this would be much nicer if “private.x” were spelled “this.@x” and “private(x)” were spelled “x.@” +1 and this is not a minor point. Also, I don’t see why constructors need to use the “private.x” syntax whereas other methods

Re: Polyfill for Maps and Sets

2013-01-18 Thread Brendan Eich
Thaddee Tyl wrote: On Thu, Jan 17, 2013 at 8:12 PM, Domenic Denicola dome...@domenicdenicola.com wrote: Dude, do you even read the spec? http://people.mozilla.org/~jorendorff/es6-draft.html#sec-15.14.5.4 So this is just the wiki lacking some updates?

Re: Security Demands Simplicity (was: Private Slots)

2013-01-18 Thread Russell Leggett
I've been stewing on this some more, and I realized something potentially very interesting. If we use weakmaps in the manner specified by Kevin (with Mark's help), I think we've very nearly added nominal typing to classes. Assuming this privacy behavior was tied to classes, and assuming only

Re: Private symbols as WeakMap sugar

2013-01-18 Thread Andreas Rossberg
On 17 January 2013 21:08, Brendan Eich bren...@mozilla.com wrote: Andreas Rossberg wrote: Actually, I don't see why this should have a measurable impact on performance in practice. The generic case is dog-slow for JavaScript anyway, what matters is how easy it is to specialise for the types

Re: Security Demands Simplicity (was: Private Slots)

2013-01-18 Thread David Bruant
Le 18/01/2013 06:47, Russell Leggett a écrit : On Thu, Jan 17, 2013 at 9:40 PM, Kevin Smith khs4...@gmail.com mailto:khs4...@gmail.com wrote: It seems as if this approach to private class members also allows us to describe private methods in a convenient way. Private methods can

Re: Security Demands Simplicity (was: Private Slots)

2013-01-18 Thread Kevin Smith
Kevin, could you do an alterna-gist as Domenic proposes? Of course there's much more at stake than syntax, but it would help. I've updated my gist to clarify Domenic's second point, but I'll let him maintain his fork for the @ syntax variation. { Kevin }

Re: Security Demands Simplicity (was: Private Slots)

2013-01-18 Thread Kevin Smith
I've been stewing on this some more, and I realized something potentially very interesting. If we use weakmaps in the manner specified by Kevin (with Mark's help), Um, that should be Mark (with Kevin's itty-bitty help). : ) { Kevin } ___ es-discuss

Re: Proxy target as __proto__? (Re: Proxy's optional target)

2013-01-18 Thread Tom Van Cutsem
Hi Claus, I'm not sure I fully understand your proposal, but could you not achieve it by simply doing: var target = ...; // might be frozen var p = Proxy( Object.create(target), handler); ? Cheers, Tom 2013/1/17 Claus Reinke claus.rei...@talk21.com The proxy target is important because it

Re: Polyfill for Maps and Sets

2013-01-18 Thread Rick Waldron
It doesn't seem reasonable to maintain two versions of the proposals as they become specifications. My first thought is that the simplest possible strategy is to update harmony proposal pages (on the wiki) with a line at the top that indicates that the proposal is now in the spec draft. This is

Wiki and drafts (was: Polyfill for Maps and Sets)

2013-01-18 Thread David Bruant
Le 18/01/2013 18:58, Rick Waldron a écrit : It doesn't seem reasonable to maintain two versions of the proposals as they become specifications. My first thought is that the simplest possible strategy is to update harmony proposal pages (on the wiki) with a line at the top that indicates that

Re: Polyfill for Maps and Sets

2013-01-18 Thread Rick Waldron
As it turns out, my suggestion above had already been used (at least) once before—Allen marked the destructuring proposal similarly. I've gone ahead and updated the following: http://wiki.ecmascript.org/doku.php?id=harmony:spread http://wiki.ecmascript.org/doku.php?id=harmony:rest_parameters

Re: Wiki and drafts (was: Polyfill for Maps and Sets)

2013-01-18 Thread Rick Waldron
Cool, check this: https://mail.mozilla.org/pipermail/es-discuss/2013-January/028270.html :) That's not all of them, but I'll go through it all again for anything I missed (unless you want to list any here, which would be fantastic) Rick On Fri, Jan 18, 2013 at 1:08 PM, David Bruant

RE: Wiki and drafts (was: Polyfill for Maps and Sets)

2013-01-18 Thread Domenic Denicola
I think part of the confusion is that, from what I understand, harmony refers to things that are agreed upon by all TC39 members, or at least were at one time. But this does not imply it being in ES6. That is, much confusion I've seen on the internet stems from people assuming harmony means

Re: Wiki and drafts (was: Polyfill for Maps and Sets)

2013-01-18 Thread Mark S. Miller
No. Harmony refers to the agreed post-ES5 trajectory of the language. It was part of the harmonious agreement to accept ES3.1 as ES5. ES6 and ES7 are both steps of ES-Harmony. On Fri, Jan 18, 2013 at 10:48 AM, Brandon Benvie bran...@brandonbenvie.com wrote: My understanding is that harmony

Re: Wiki and drafts

2013-01-18 Thread Rick Waldron
On Fri, Jan 18, 2013 at 2:09 PM, Brendan Eich bren...@mozilla.com wrote: What was Harmonious prospectively can still be Harmonious in ES6 (as in ES5, remember, Harmony started in July 2008). The wiki harmony: namespace remains. I agree with the idea already in practice that Rick cited. Big

Re: Wiki and drafts (was: Polyfill for Maps and Sets)

2013-01-18 Thread Rick Waldron
On Fri, Jan 18, 2013 at 2:13 PM, Mark S. Miller erig...@google.com wrote: No. Harmony refers to the agreed post-ES5 trajectory of the language. It was part of the harmonious agreement to accept ES3.1 as ES5. ES6 and ES7 are both steps of ES-Harmony. I believe a good example is

Can JS Algorithm object finally solve html5 codecs gridlock and move us forward?

2013-01-18 Thread neuralll
Hi guys I am playing with web audio api and mozilla audio api but I got frustrated about so much html5 potential wasted due to infinite codecs deadlock support in browsers holding progress back for so long. This even resulted to people writing codecs purely in JS. Unfortunately performance is

Re: Proxy target as __proto__? (Re: Proxy's optional target)

2013-01-18 Thread Claus Reinke
Hi Tom, I'm not sure I fully understand your proposal, but could you not achieve it by simply doing: var target = ...; // might be frozen var p = Proxy( Object.create(target), handler); Ah, too obvious for me, thanks! Also, proxy wrappers often modify functions, which tend to be on a

Re: Can JS Algorithm object finally solve html5 codecs gridlock and move us forward?

2013-01-18 Thread David Bruant
Hi Ladislav, Le 18/01/2013 22:51, neuralll a écrit : Hi guys I am playing with web audio api and mozilla audio api but I got frustrated about so much html5 potential wasted due to infinite codecs deadlock support in browsers holding progress back for so long. This even resulted to people