Arguments instantiation by destructuring assignment has no effect on June 15 draft

2012-06-25 Thread Yusuke Suzuki
Arguments instantiation by destructuring assignment has no effect on June 15 draft Hello everyone, I'm now implementing ES.next engine in ES5.1 and I may find issue on current draft. In June 15 draft, to realize destructuring assignment in FormalParameters, we perform Binding Initialisation for

Arguments instantiation by destructuring assignment has no effect on current draft

2012-06-25 Thread Yusuke Suzuki
Hello everyone, I'm now implementing ES.next engine in ES5.1 and I may find issue on current draft. In June 15 draft, to realize destructuring assignment in FormalParameters, we perform Binding Initialisation for formals with Arguments object. In section 10.5.3, step 8-d, d. Let

Some Array methods don't consider array holes and length

2012-06-25 Thread Yusuke Suzuki
Hello, In some Array methods such as 'slice', 'splice', they don't [[Put]] 'length' value. And they check [[HasProperty]] before [[DefineOwnProperty]]. As the result, they waste empty trailing elements, but it is not compatible behavior to ES3. For example, [0].slice(0) In ES3, this

Re: Detecting the type of a DOM object

2012-06-25 Thread Brendan Eich
David Bruant wrote: Le 24/06/2012 14:51, Brendan Eich a écrit : David Bruant wrote: Instead of adding a new [[instanceofHint]] internal property, maybe the [[NativeBrand]] could be reused. +1 on that, which suggests [[NativeBrandMatch]] instead of [[InstanceofMatch]]. Your proposal is more

Re: Detecting the type of a DOM object

2012-06-25 Thread Rick Waldron
On Monday, June 25, 2012 at 4:28 AM, Brendan Eich wrote: David Bruant wrote: Le 24/06/2012 14:51, Brendan Eich a écrit : David Bruant wrote: Instead of adding a new [[instanceofHint]] internal property, maybe the [[NativeBrand]] could be reused. +1 on that, which

Re: Detecting the type of a DOM object

2012-06-25 Thread Rick Waldron
On Mon, Jun 25, 2012 at 9:11 AM, David Bruant bruan...@gmail.com wrote: snip Firefox is partially built in JavaScript. This code is considered privileged (by opposition to website JavaScript). More things can be allowed to this JavaScript code. In case the DOM is built in pure browser

fail-fast object destructuring

2012-06-25 Thread David Herman
Implicit coercions suck, and IMO it would be better if destructuring didn't add new ones to JS. In the current draft spec, I believe if you match an object destructuring pattern against a non-object or an object that doesn't have one or more of the properties, it quietly proceeds -- masking

Re: fail-fast object destructuring

2012-06-25 Thread Andreas Rossberg
On 25 June 2012 17:17, David Herman dher...@mozilla.com wrote: Implicit coercions suck, and IMO it would be better if destructuring didn't add new ones to JS. In the current draft spec, I believe if you match an object destructuring pattern against a non-object or an object that doesn't

Re: Detecting the type of a DOM object

2012-06-25 Thread Allen Wirfs-Brock
On Jun 22, 2012, at 11:01 AM, David Bruant wrote: ... There is a potential security issue. From the wiki [1] (in the case where the instance is a proxy trapping on instanceof): Security issue: the handler is given a reference to the function object (the right-hand side of the instanceof

Re: Detecting the type of a DOM object

2012-06-25 Thread Allen Wirfs-Brock
On Jun 24, 2012, at 5:51 AM, Brendan Eich wrote: David Bruant wrote: Instead of adding a new [[instanceofHint]] internal property, maybe the [[NativeBrand]] could be reused. +1 on that, which suggests [[NativeBrandMatch]] instead of [[InstanceofMatch]]. No, the whole point of

Re: fail-fast object destructuring

2012-06-25 Thread Brendan Eich
Andreas Rossberg wrote: On 25 June 2012 17:17, David Hermandher...@mozilla.com wrote: Implicit coercions suck, and IMO it would be better if destructuring didn't add new ones to JS. In the current draft spec, I believe if you match an object destructuring pattern against a non-object or an

Re: Detecting the type of a DOM object

2012-06-25 Thread David Bruant
Le 25/06/2012 17:36, Allen Wirfs-Brock a écrit : On Jun 22, 2012, at 11:01 AM, David Bruant wrote: ... There is a potential security issue. From the wiki [1] (in the case where the instance is a proxy trapping on instanceof): Security issue: the handler is given a reference to the function

Re: fail-fast object destructuring

2012-06-25 Thread Erik Arvidsson
On Mon, Jun 25, 2012 at 9:14 AM, Brendan Eich bren...@mozilla.org wrote: I'm ok with this even though it is not compatible with what we've implemented and user-tested for almost six years, but I want (b) as part of the deal. We have code that will use ?-prefixing. I want this (a) too but I

Internationalization API: LocaleList removal

2012-06-25 Thread Norbert Lindenberg
At the TC 39 meeting on May 21, we decided to remove LocaleList from the Internationalization API because its primary purpose is performance and we don't have evidence that there actually is a performance problem requiring this solution. One side effect of removing LocaleList from the API is

Re: Some Array methods don't consider array holes and length

2012-06-25 Thread Allen Wirfs-Brock
On Jun 25, 2012, at 1:18 AM, Yusuke Suzuki wrote: Hello, In some Array methods such as 'slice', 'splice', they don't [[Put]] 'length' value. And they check [[HasProperty]] before [[DefineOwnProperty]]. As the result, they waste empty trailing elements, but it is not compatible behavior

Re: Detecting the type of a DOM object

2012-06-25 Thread David Bruant
Le 25/06/2012 17:49, Allen Wirfs-Brock a écrit : On Jun 24, 2012, at 5:51 AM, Brendan Eich wrote: David Bruant wrote: Instead of adding a new [[instanceofHint]] internal property, maybe the [[NativeBrand]] could be reused. +1 on that, which suggests [[NativeBrandMatch]] instead of

Re: Detecting the type of a DOM object

2012-06-25 Thread Allen Wirfs-Brock
On Jun 25, 2012, at 11:10 AM, David Bruant wrote: Le 25/06/2012 17:49, Allen Wirfs-Brock a écrit : On Jun 24, 2012, at 5:51 AM, Brendan Eich wrote: David Bruant wrote: Instead of adding a new [[instanceofHint]] internal property, maybe the [[NativeBrand]] could be reused. +1 on that, which

Re: Default iterator

2012-06-25 Thread David Herman
On Jun 20, 2012, at 9:37 PM, Erik Arvidsson wrote: In our previous discussion I had come to the understanding that the default iterator would use a private name. The main benefit for using a private name is to not pollute the property name space. import iterator from '@iter';

Re: Detecting the type of a DOM object

2012-06-25 Thread Tom Van Cutsem
2012/6/25 Allen Wirfs-Brock al...@wirfs-brock.com On Jun 22, 2012, at 11:01 AM, David Bruant wrote: ... There is a potential security issue. From the wiki [1] (in the case where the instance is a proxy trapping on instanceof): Security issue: the handler is given a reference to the

Re: Internationalization API: LocaleList removal

2012-06-25 Thread Norbert Lindenberg
Good idea. A frozen array is more restrictive than a LocaleList (which is extensible), but that's probably OK in this context. Or we could thaw it a bit... Norbert On Jun 25, 2012, at 10:09 , Andreas Rossberg wrote: On 25 June 2012 19:00, Norbert Lindenberg ecmascr...@norbertlindenberg.com

Re: Internationalization API: LocaleList removal

2012-06-25 Thread Allen Wirfs-Brock
On Jun 25, 2012, at 3:36 PM, Norbert Lindenberg wrote: Good idea. A frozen array is more restrictive than a LocaleList (which is extensible), but that's probably OK in this context. Or we could thaw it a bit... Right, if you wanted to be less restrictive (more like the way LocaleList was

Re: Internationalization API: LocaleList removal

2012-06-25 Thread Rick Waldron
On Mon, Jun 25, 2012 at 6:36 PM, Norbert Lindenberg ecmascr...@norbertlindenberg.com wrote: Good idea. A frozen array is more restrictive than a LocaleList (which is extensible), but that's probably OK in this context. Or we could thaw it a bit... I was thinking the same thing, but was

Re: private name methods ?

2012-06-25 Thread Irakli Gozalishvili
I have realized this idea in a JS library: https://github.com/Gozala/method Regards -- Irakli Gozalishvili Web: http://www.jeditoolkit.com/ On Thursday, 2012-06-21 at 12:31 , Irakli Gozalishvili wrote: I get few comments on twitter regarding this: So the idea is that a private name

ES Modules: suggestions for improvement

2012-06-25 Thread James Burke
Posted here: http://tagneto.blogspot.ca/2012/06/es-modules-suggestions-for-improvement.html Some of it is a retread of earlier feedback, but some of it may have been lost in my poor communication style. I did this as a post instead of inline feedback since it is long, it has lots of hyperlinks