Re: Dynamic Modules Questions

2013-03-07 Thread David Bruant
Le 06/03/2013 23:31, Sam Tobin-Hochstadt a écrit : On Wed, Mar 6, 2013 at 9:46 AM, Kevin Smith khs4...@gmail.com wrote: (Referencing the module loaders proposal at http://wiki.ecmascript.org/doku.php?id=harmony:module_loaders) 1) Loaders have a strict flag which indicates whether code

Re: Dynamic Modules Questions

2013-03-07 Thread Sam Tobin-Hochstadt
On Mar 6, 2013 10:04 PM, Kevin Smith khs4...@gmail.com wrote: 3) There doesn't appear to be a way to provide a dynamically created module instance (created via the Module constructor) as the result of the fetch hook. My thought is that such a feature might be useful for implementing

Re: Dynamic Modules Questions

2013-03-07 Thread Sam Tobin-Hochstadt
On Mar 7, 2013 4:53 AM, David Bruant bruan...@gmail.com wrote: Le 06/03/2013 23:31, Sam Tobin-Hochstadt a écrit : On Wed, Mar 6, 2013 at 9:46 AM, Kevin Smith khs4...@gmail.com wrote: (Referencing the module loaders proposal at http://wiki.ecmascript.org/doku.php?id=harmony:module_loaders)

Re: Dynamic Modules Questions

2013-03-07 Thread David Bruant
Le 07/03/2013 13:19, Sam Tobin-Hochstadt a écrit : On Mar 7, 2013 4:53 AM, David Bruant bruan...@gmail.com mailto:bruan...@gmail.com wrote: Le 06/03/2013 23:31, Sam Tobin-Hochstadt a écrit : On Wed, Mar 6, 2013 at 9:46 AM, Kevin Smith khs4...@gmail.com mailto:khs4...@gmail.com wrote:

Re: Dynamic Modules Questions

2013-03-07 Thread Kevin Smith
This would imply that the result of the fetch hook is ignored if the module has been installed in the module instance table before the hook callbacks are executed. True? This is the same for all the loader hooks, in fact. Sounds good. Is there way, within a fetch hook, to conditionally

Questions/issues regarding generators

2013-03-07 Thread Andreas Rossberg
We have started investigating the implementation of generators in V8, and a couple of questions popped up that are not quite clear from the proposal (and not yet in the draft spec, AFAICS): 1) Are the methods of a generator object installed as frozen properties? (I hope so, otherwise it would be

Re: Questions/issues regarding generators

2013-03-07 Thread Claus Reinke
But, in order to (hopefully) let Brandon calm down a bit, I am NOT making yet another proposal for a two-method protocol. Instead I propose simply _delivering_ a sentinel object as end-of-iteration marker instead of _throwing_ one. The zip function above would then be written as: function

Re: Questions/issues regarding generators

2013-03-07 Thread Andreas Rossberg
On 7 March 2013 16:37, Andreas Rossberg rossb...@google.com wrote: But, in order to (hopefully) let Brandon calm down a bit, I am NOT making yet another proposal for a two-method protocol. Instead I propose simply _delivering_ a sentinel object as end-of-iteration marker instead of _throwing_

Re: Questions/issues regarding generators

2013-03-07 Thread Andreas Rossberg
On 7 March 2013 17:29, Claus Reinke claus.rei...@talk21.com wrote: How about lifting the result, to separate yielded objects and end iteration signalling? { yields: obj }// iteration yields obj {} // iteration ends Yes, that would be the proper encoding of an Option/Maybe type,

Re: Questions/issues regarding generators

2013-03-07 Thread Kevin Reid
On Thu, Mar 7, 2013 at 8:39 AM, Andreas Rossberg rossb...@google.comwrote: On 7 March 2013 16:37, Andreas Rossberg rossb...@google.com wrote: But, in order to (hopefully) let Brandon calm down a bit, I am NOT making yet another proposal for a two-method protocol. Instead I propose simply

Reminder to i18n v2.0 strawman authors

2013-03-07 Thread Nebojša Ćirić
Gentlemen, please take a look at http://wiki.ecmascript.org/doku.php?id=globalization:strawman and add any documents that are missing, before the March meeting. -- Nebojša Ćirić ___ es-discuss mailing list es-discuss@mozilla.org

Re: Questions/issues regarding generators

2013-03-07 Thread Andreas Rossberg
On 7 March 2013 17:50, Kevin Reid kpr...@google.com wrote: Use of a singleton (or not marked for the specific generator) sentinel object has a hazard: the sentinel is then a magic value which cannot be safely processed by library code written to operate on arbitrary values, which happens to

Re: Questions/issues regarding generators

2013-03-07 Thread Kevin Reid
On Thu, Mar 7, 2013 at 8:56 AM, Andreas Rossberg rossb...@google.comwrote: On 7 March 2013 17:50, Kevin Reid kpr...@google.com wrote: Use of a singleton (or not marked for the specific generator) sentinel object has a hazard: the sentinel is then a magic value which cannot be safely

Re: Questions/issues regarding generators

2013-03-07 Thread Claus Reinke
How about lifting the result, to separate yielded objects and end iteration signalling? { yields: obj }// iteration yields obj {} // iteration ends Yes, that would be the proper encoding of an Option/Maybe type, which in the abstract is the ideal (the end object might carry a return

Re: Questions/issues regarding generators

2013-03-07 Thread Allen Wirfs-Brock
On Mar 7, 2013, at 7:37 AM, Andreas Rossberg wrote: We have started investigating the implementation of generators in V8, and a couple of questions popped up that are not quite clear from the proposal (and not yet in the draft spec, AFAICS): 1) Are the methods of a generator object

Re: Questions/issues regarding generators

2013-03-07 Thread Brandon Benvie
On 3/7/2013 7:37 AM, Andreas Rossberg wrote: We have started investigating the implementation of generators in V8, and a couple of questions popped up that are not quite clear from the proposal (and not yet in the draft spec, AFAICS): 1) Are the methods of a generator object installed as frozen

Re: Questions/issues regarding generators

2013-03-07 Thread Andreas Rossberg
On 7 March 2013 18:30, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Mar 7, 2013, at 7:37 AM, Andreas Rossberg wrote: 1) Are the methods of a generator object installed as frozen properties? (I hope so, otherwise it would be more difficult to aggressively optimise generators.) We

Re: Questions/issues regarding generators

2013-03-07 Thread Allen Wirfs-Brock
On Mar 7, 2013, at 11:05 AM, Andreas Rossberg wrote: On 7 March 2013 18:30, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Mar 7, 2013, at 7:37 AM, Andreas Rossberg wrote: Allen: I'm not sure I convinced by this. An iterator instance represent a single specific iteration. Your second

Re: Questions/issues regarding generators

2013-03-07 Thread Erik Arvidsson
One more thing worth pointing out is that a singleton does not work due to return e in generators needs to signal an end to iteration with a value. The wiki does this be creating a new object with a value property and [[Class]] set to StopIteration Instead of returning a singleton we can return

Re: Questions/issues regarding generators

2013-03-07 Thread Andreas Rossberg
On 7 March 2013 22:30, Erik Arvidsson erik.arvids...@gmail.com wrote: One more thing worth pointing out is that a singleton does not work due to return e in generators needs to signal an end to iteration with a value. The wiki does this be creating a new object with a value property and

Re: Questions/issues regarding generators

2013-03-07 Thread Andreas Rossberg
On 7 March 2013 21:58, Allen Wirfs-Brock al...@wirfs-brock.com wrote: I think the meaning of @@iterator would be clearer if it was named asIterator. obj.asIterator()/obj[@@iterator]]() is a request to provide an iterator which may be either. obj itself or a new object that provides default

Identifying ECMAScript identifiers

2013-03-07 Thread Norbert Lindenberg
ECMAScript is used to implement a variety of tools that check code for conformance with the ECMAScript specification, minimize it, perform other transformations, or generate ECMAScript code. These tools have to be able to recognize ECMAScript identifiers, taking the identifier specification and