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?

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]] and

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

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

2009-05-18 Thread Igor Bukanov
2009/5/18 Brendan Eich bren...@mozilla.com: 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

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 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

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

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

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.