Re: iterate and enumerate trap signature inconsistency

2012-09-12 Thread Tom Van Cutsem
2012/9/11 Mark S. Miller erig...@google.com [...] If we change this API from returning an array of strings to returning an iterator, I agree that alters the balance and justifies waiving this particular guarantee. I also don't see any real issues with waiving the duplicate names check. It's

Re: Save modification made by a ecmascript on svg file

2012-09-12 Thread Mister Vanhalen
Thank you very much for your answers. I thought it was possible to save data from server with ecmascript, that why I post it here. I'm gonna search through your weblinks. Thank you for your advices, Mr On Tue, Sep 11, 2012 at 6:59 PM, Russell Leggett russell.legg...@gmail.comwrote: This

Re: iterate and enumerate trap signature inconsistency

2012-09-12 Thread David Bruant
Le 12/09/2012 08:19, Tom Van Cutsem a écrit : 2012/9/11 Mark S. Miller erig...@google.com mailto:erig...@google.com [...] If we change this API from returning an array of strings to returning an iterator, I agree that alters the balance and justifies waiving this particular

Re: iterate and enumerate trap signature inconsistency

2012-09-12 Thread Tom Van Cutsem
2012/9/12 David Bruant bruan...@gmail.com [...] For the second check, I'd like to note a couple of implementation details which are relevant I think. First, as you suggest, the set of minimum reported properties has to be decided before the first iteration (otherwise, this set may change

Re: Generator issue: exceptions while initializing arguments

2012-09-12 Thread Brendan Eich
Kevin Smith wrote: function f(x) { console.log(x); if (truthy()) { with ({x: 'ha ha'}) { var x = 'ho ho'; console.log(x); } } function x(){} console.log(x); } In these cases there is

Re: Sharing objects across modules (was: VirtualHandler fundamental traps default values)

2012-09-12 Thread Sam Tobin-Hochstadt
On Tue, Sep 11, 2012 at 3:44 PM, Tom Van Cutsem tomvc...@gmail.com wrote: I don't know the exact rules of module instance objects. Is it possible to reify the same module as multiple distinct instance objects in the same module loader context, or does the loader context cache a single instance

Re: A syntax alternative for generators

2012-09-12 Thread Brendan Eich
Allen Wirfs-Brock wrote: The initializing generator arguments thread and related discussions has got me questioning our use of function declaration/expression syntax as our basis for defining generators. Changing this would be a departure from what Firefox has supported in recent years, but

Re: Generator issue: exceptions while initializing arguments

2012-09-12 Thread Brendan Eich
Dmitry Soshnikov wrote: On Tue, Sep 11, 2012 at 1:33 AM, Brendan Eich bren...@mozilla.com mailto:bren...@mozilla.com wrote: If you really want the Pythonic default parameter rules (evaluation in definition context) then you need to address the bad case Jason showed:

Re: A syntax alternative for generators

2012-09-12 Thread Brendan Eich
Contrived example has contrived error. Sorry, this is really not fairly argued or evidence-based. Generators are the easiest way to write an iterator implementation. Typically iterator implementations are named, reusable. The better way to write anything like the mutable collection snapshot

Re: A syntax alternative for generators (was: Generator issue: exceptions while initializing arguments)

2012-09-12 Thread Jason Orendorff
Allen, even with all the requirements you listed, I wouldn't write that example code. There's a more natural way to factor the problem. The original example fails for at least the last bullet. To fix that, it would have to be rewritten, something like: function dataSnapshot(aDataSource) {

Re: iterate and enumerate trap signature inconsistency

2012-09-12 Thread Mark S. Miller
On Wed, Sep 12, 2012 at 1:27 AM, David Bruant bruan...@gmail.com wrote: [...] There are numerous examples where ES5 assumptions are questioned by proxies, like: for(var p in obj){ var desc = Object.getOwnPropertyDescriptor(obj, p) // ... } In this snippet, ES5

Calendar issues

2012-09-12 Thread Norbert Lindenberg
ES5 section 15.9.1 specifies a number of operations to map time values (measured in milliseconds from January 1, 1970, midnight UTC) to year/month/day/hour/minute/second values, and the ECMAScript Internationalization API specification section 12.3.2 mandates use of these algorithms also for

Re: Calendar issues

2012-09-12 Thread Mark Davis ☕
Mark https://plus.google.com/114199149796022210033 * * *— Il meglio è l’inimico del bene —* ** On Wed, Sep 12, 2012 at 8:43 PM, Norbert Lindenberg ecmascr...@norbertlindenberg.com wrote: ES5 section 15.9.1 specifies a number of operations to map time values (measured in milliseconds from

Re: Calendar issues

2012-09-12 Thread Mark Davis ☕
+Peter, since he has an interest in these issues. Mark https://plus.google.com/114199149796022210033 * * *— Il meglio è l’inimico del bene —* ** On Wed, Sep 12, 2012 at 9:37 PM, Mark Davis ☕ m...@macchiato.com wrote: Mark https://plus.google.com/114199149796022210033 * * *— Il meglio è