Re: [Harmony Proxies] Adding a defineProperties derived trap

2011-03-15 Thread David Bruant
Le 15/03/2011 04:24, David Herman a écrit : [Oh sorry, I'm behind on the iteration-order mega-thread. I'll have to catch up.] Summury of how the iteration thread may affect this proposal: If the iteration-order thread ends up to the conclusion that for objects ({}-like objects, not arrays or

Re: [Harmony proxies] Thoughts on function proxies

2011-03-15 Thread David Bruant
Le 15/03/2011 00:52, David Bruant a écrit : Hi, I've been thinking about Function proxy use cases lately. Things that the spec do and that could be convenient to emulate as well or just things that could be useful. * [[Construct]]-less functions. All Array.prototype methods are like that as

Re: yield and new : SpiderMonkey and the draft Spec

2011-03-15 Thread John J. Barton
On 3/14/2011 10:08 PM, Brendan Eich wrote: On Mar 14, 2011, at 11:50 PM, John J. Barton wrote: On 11:59 AM, Brendan Eich wrote: However, there's no way for a generator function to return that instance, because a generator function always implicitly returns a fresh generator iterator when

Re: yield and new : SpiderMonkey and the draft Spec

2011-03-15 Thread Dmitry A. Soshnikov
On 15.03.2011 17:58, John J. Barton wrote: On 3/14/2011 10:08 PM, Brendan Eich wrote: On Mar 14, 2011, at 11:50 PM, John J. Barton wrote: On 11:59 AM, Brendan Eich wrote: However, there's no way for a generator function to return that instance, because a generator function always implicitly

Re: [Harmony Proxies] Adding a defineProperties derived trap

2011-03-15 Thread Allen Wirfs-Brock
I think there is something deeper lurking behind this issue. Proxies can be used to define objects whose property semantics can be quite different from those of native objects. In some situations the built-in Object. reflection functions are not going to be flexible enough to reify a mirror

Re: yield and new : SpiderMonkey and the draft Spec

2011-03-15 Thread David Herman
P.S.: A small change, e.g. can be to make next as a getter since it doesn't accept arguments. g.next; // 1 g.next; // 2 But, it's a cosmetic and actually not so needed change. -1 The purpose of the next interface is to change the state of the iterator. A getter interface obscures

Re: yield and new : SpiderMonkey and the draft Spec

2011-03-15 Thread Dmitry A. Soshnikov
Moreover, forgot to mention. Passing the generator function (g-function and g-object for shortness) as an argument for the `Generator` constructor is not good for dynamically bound `this` value (notice, that in Python's `self` is just a casual variable/argument, which should be passed manually

Re: Re: yield and new : SpiderMonkey and the draft Spec

2011-03-15 Thread John J. Barton
On 11:59 AM, Dmitry A. Soshnikov wrote: Moreover, forgot to mention. Passing the generator function (g-function and g-object for shortness) as an argument for the `Generator` constructor is not good for dynamically bound `this` value (notice, that in Python's `self` is just a casual

Re: Re: yield and new : SpiderMonkey and the draft Spec

2011-03-15 Thread John J. Barton
On 11:59 AM, David Herman wrote: P.S.: A small change, e.g. can be to make next as a getter since it doesn't accept arguments. g.next; // 1 g.next; // 2 But, it's a cosmetic and actually not so needed change. -1 The purpose of the next interface is to change the state of the iterator. A

Re: [Harmony Proxies] Adding a defineProperties derived trap

2011-03-15 Thread David Bruant
Le 15/03/2011 18:07, Allen Wirfs-Brock a écrit : I think there is something deeper lurking behind this issue. Proxies can be used to define objects whose property semantics can be quite different from those of native objects. In some situations the built-in Object. reflection functions are

Re: Object property for-in enumeration as an internal method

2011-03-15 Thread Allen Wirfs-Brock
This seems like an issue for the next major edition rather than a correctable error for ES5/5.1. However, feel free to submit a bug at bugs.ecmascript.org. That will capture the issue so it can be address in a future edition. Allen ' On Mar 12, 2011, at 2:45 PM, David Bruant wrote: Hi,

Another Major test262 Update

2011-03-15 Thread Dave Fugate
Hi all, before saying anything about the most recent update, I'd just like to say thanks to everyone whose reported bugs on defective test cases thus far. Your valuable feedback truly does help make test262 an accurate conformance suite for ECMAScript 5! Please keep the bug reports coming.

Re: Extended Object Literals to review

2011-03-15 Thread Juan Ignacio Dopazo
One more question about the future of classes on Harmony. Although the meta: property syntax is very clear, I'm wondering if it isn't better to be less innovative and stick to what ES4/Java/etc have been doing for a long time. Wouldn't something like this ease the learning curve of the new

Re: yield and new : SpiderMonkey and the draft Spec

2011-03-15 Thread Dmitry A. Soshnikov
On 15.03.2011 21:13, John J. Barton wrote: On 11:59 AM, Dmitry A. Soshnikov wrote: Moreover, forgot to mention. Passing the generator function (g-function and g-object for shortness) as an argument for the `Generator` constructor is not good for dynamically bound `this` value (notice, that in

Re: yield and new : SpiderMonkey and the draft Spec

2011-03-15 Thread Brendan Eich
Sorry, this is both foolish consistency and a boilerplate tax on users. Worse, it removes a special form (syntax dedicated to a new primitive) that implementations need to parse, in order to compile and optimize the function using the primitive. We are not going to add a Generator constructor.

Re: Extended Object Literals to review

2011-03-15 Thread Allen Wirfs-Brock
The starting point for the class initialiser proposal are the Object Initialiser Extensions. I wanted to add the option to specify the prototype for ObjectLiteral and ArrayLiteral but because they aren't prefixed by a keyword, the extends like syntax doesn't work for them. The proto: foo

Re: Extended Object Literals to review

2011-03-15 Thread Juan Ignacio Dopazo
Absolutely not! I read the word meme and I panicked! Please understand that I'm trying to write about highly technical topics in a foreign language (I'm from Argentina), so sometimes my word choice may not be the best. I used classes mostly because it's what most of JS developers I know use today

Playground for the quasi strawmen

2011-03-15 Thread Mike Samuel
I put together a playground so you can interactively experiment with the quasi strawman syntax while I update the draft spec. Take a look at http://js-quasis-libraries-and-repl.googlecode.com/svn/trunk/index.html It's a REPL derived from the squarefree shell which desugars the input before

[Harmony proxies] Opinion on the open issue (How to deal with inconsistent data returned by handler traps?)

2011-03-15 Thread David Bruant
Hi, On the proxy proposal is an open issue. It starts with How to deal with inconsistent data returned by handler traps? (actually, the issue also applies to inputs since I can provide garbage as Object.defineProperty arguments). First of all, I think that there might be a false assumption in the