Nit: Definitions of SetMutableBinding methods refer to method by wrong name

2009-05-18 Thread Jim Blandy
The definitions of the SetMutableBinding method for both declarative and object environment records (10.2.1.1.3 and 10.2.1.2.2) refer to "SetMutableValue" in their first sentence. This name doesn't occur anywhere else; I assume they're supposed to be SetMutableBinding. ___

Nit: Appendix C: VariableDeclaration restriction lacks section number

2009-05-18 Thread Jim Blandy
In Appendix C, "The Strict Mode of ECMAScript", the paragraph noting that VariableDeclaration and VariableDeclarationIn may not assign to eval in strict mode doesn't cite any particular section number; shouldn't it cite 12.2.1? ___ es-discuss mailing

Re: Array Like Interface

2009-05-18 Thread Allen Wirfs-Brock
(forwarding for Travis since his direct post bounced) From: Travis Leithead Sent: Monday, May 18, 2009 10:28 AM To: bren...@mozilla.com; Allen Wirfs-Brock; c...@mcc.id.au Cc: es-discuss; Garrett Smith; Chris Wilson Subject: Re: Array Like Interface (Adding Cameron, the WebIDL editor) >> Anyon

Nit: 10.2.1.2.4: GetBindingValue(N,S) for object environment records

2009-05-18 Thread Jim Blandy
The last sentence of the first paragraph should end with "... the result depends on the value of the S argument:". ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: yield syntax (diverging from: How would shallow generators compose with lambda?)

2009-05-18 Thread Brendan Eich
On May 18, 2009, at 12:15 PM, Neil Mix wrote: Ah, but delete and typeof are different in that they both *require* an argument (terminology be damned, hopefully you understand what I mean by that.) And return is different because it can't be used in an expression. See my previous let x = yi

Re: yield syntax (diverging from: How would shallow generators compose with lambda?)

2009-05-18 Thread Neil Mix
On May 18, 2009, at 12:23 PM, Brendan Eich wrote: Making them mandatory is the issue. You can derive whatever comfort you want from 'em, but they are not required and we're not going to start requiring them for return, delete, or typeof. So mandating parentheses for yield is kind of wrong.

Re: yield syntax (diverging from: How would shallow generators compose with lambda?)

2009-05-18 Thread Brendan Eich
On May 18, 2009, at 11:53 AM, Neil Mix wrote: But for this to be true, we would need to use the direct-eval detection hack I mentioned previously. On the plus side, this would allow for feature detection of generator support, right? (Is there any other way to detect generator support?)

Re: yield syntax (diverging from: How would shallow generators compose with lambda?)

2009-05-18 Thread Igor Bukanov
2009/5/18 Brendan Eich : > > On May 18, 2009, at 2:25 AM, Igor Bukanov wrote: > >> The remedy for this is simple - the generator can be created using >> explicit call like Generator(f, arg1, ... argN). This would turn any >> function into a generator and would allow for runtime checks for eval. > >

Re: yield syntax (diverging from: How would shallow generators compose with lambda?)

2009-05-18 Thread Neil Mix
Nothing prevents you from writing yield(E) of course -- but you're arguing that foo(a = yield(b), c) should be enough, no extra parens required -- no foo(a = (yield(b)), c). Right? Yes that's correct. Pros for yield(E): - backward compatible But for this to be true, we would need to use t

Minor nits: sections 10.2.1.1, 10.2.1.2

2009-05-18 Thread Jim Blandy
In section 10.2.1.1, "Declarative environment records", the first paragraph has an extra comma before "and/or function declarations". There are only two alternatives there, so no comma is necessary. In section 10.2.1.2, "Object Environment Records", the second sentence begins, "An environment

RE: Array Like Interface

2009-05-18 Thread Allen Wirfs-Brock
>-Original Message- >From: Garrett Smith [mailto:dhtmlkitc...@gmail.com] > >Right. The problem is that that implied interface is not fulfilled in >a compatible way IE. IE has list-like host objects which do not work >with Array generics, even though those objects appear to support >[[Get]]

Re: yield syntax (diverging from: How would shallow generators compose with lambda?)

2009-05-18 Thread Brendan Eich
On May 18, 2009, at 2:25 AM, Igor Bukanov wrote: The remedy for this is simple - the generator can be created using explicit call like Generator(f, arg1, ... argN). This would turn any function into a generator and would allow for runtime checks for eval. You mean yield, not eval, right? T

Re: yield syntax (diverging from: How would shallow generators compose with lambda?)

2009-05-18 Thread Brendan Eich
On May 18, 2009, at 5:56 AM, P T Withington wrote: On 2009-05-17, at 14:00EDT, Brendan Eich wrote: those painful and fruitless parentheses Sometimes those parentheses are comforting, not painful. How many times in JS do you see: typeof(foo) or in C.* sizeof(boo) Or even return(wa

Re: yield syntax (diverging from: How would shallow generators compose with lambda?)

2009-05-18 Thread P T Withington
On 2009-05-17, at 14:00EDT, Brendan Eich wrote: those painful and fruitless parentheses Sometimes those parentheses are comforting, not painful. How many times in JS do you see: typeof(foo) or in C.* sizeof(boo) ___ es-discuss mailing lis

Re: yield syntax (diverging from: How would shallow generators compose with lambda?)

2009-05-18 Thread Igor Bukanov
2009/5/17 Brendan Eich : > One of the appealing (at least to me) > aspects of Neil's suggestion was that it would avoid opt-in versioning > required by reserving yield (which is used in extant web content, or was > when we tried reserving it without opt-in versioning -- the particular use > was as