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

2009-05-17 Thread Brendan Eich
This may be breaking a butterfly on a wheel, but I am game if it improves the state of the strawman proposals. On May 15, 2009, at 7:16 PM, David-Sarah Hopwood wrote: My point was that the example of 'yield (foo)' (that is, yield as a prefix operator applied to the expression '(foo)') shows

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

2009-05-17 Thread Brendan Eich
On May 17, 2009, at 11:00 AM, Brendan Eich wrote: Python differs from JS by having only assignment statements, not assignment expressions, which simplifies the problem a bit, as the grep output cited above shows. Of course this makes trouble with automatic semicolon insertion, unless

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

2009-05-17 Thread Brendan Eich
On May 17, 2009, at 11:00 AM, Brendan Eich wrote: Bean-counting productions in a traditional bottom-up grammar is also silly given how many are required for ES1-3. From the patch, notice all the existing specialized NoIn/NoBF/NoNode variants in parser/ Grammar.y (NoBF = No Brace at Front,

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

2009-05-17 Thread Brendan Eich
On May 17, 2009, at 12:43 PM, Mark S. Miller wrote: On Sun, May 17, 2009 at 11:00 AM, Brendan Eich bren...@mozilla.com wrote: Analogous to direct vs. indirect eval in ES5 (15.1.2.1.1), there is no purely syntactic specification for what Neil proposes. A runtime check is required. So I

re: Catchall proposal

2009-05-17 Thread Faisal Vali
Er, in my previous post, please replace 'actions' with 'properties' Proposal #1) Hooks for only missing actions. Proposal #2) Pre/Post Hooks for existing actions sorry about that, Faisal Vali Radiation Oncology Loyola ___ es-discuss mailing list

Re: yield syntax

2009-05-17 Thread David-Sarah Hopwood
Brendan Eich wrote: On May 17, 2009, at 12:43 PM, Mark S. Miller wrote: On Sun, May 17, 2009 at 11:00 AM, Brendan Eich bren...@mozilla.com wrote: Analogous to direct vs. indirect eval in ES5 (15.1.2.1.1), there is no purely syntactic specification for what Neil proposes. A runtime check is

Re: Objects for Number, String, Boolean, Date acts like their native counter part

2009-05-17 Thread David-Sarah Hopwood
Biju wrote: [behaviour of wrappers] is weird... Why cant we make objects for Number, String, Boolean, Date acts like their native counter part? That will be what an average web developer expecting. And I dont think it will make existing web break. No, this brokenness is heavily relied on.

Re: yield syntax

2009-05-17 Thread Brendan Eich
On May 17, 2009, at 5:05 PM, David-Sarah Hopwood wrote: Brendan Eich wrote: On May 17, 2009, at 12:43 PM, Mark S. Miller wrote: On Sun, May 17, 2009 at 11:00 AM, Brendan Eich bren...@mozilla.com wrote: Analogous to direct vs. indirect eval in ES5 (15.1.2.1.1), there is no purely syntactic

Re: Objects for Number, String, Boolean, Date acts like their native counter part

2009-05-17 Thread Brendan Eich
On May 17, 2009, at 5:14 PM, David-Sarah Hopwood wrote: Biju wrote: [behaviour of wrappers] is weird... Why cant we make objects for Number, String, Boolean, Date acts like their native counter part? That will be what an average web developer expecting. And I dont think it will make existing

Re: Catchall proposal

2009-05-17 Thread Brendan Eich
Waldemar gave feedback http://wiki.ecmascript.org/doku.php?id=strawman:catchalls#feedback Waldemar's main point is a good one, which caused me to be hostile to catchalls for years: Catchalls climb the meta ladder. Primitive actions such as checking for the existence of a property when

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

2009-05-17 Thread Neil Mix
On May 17, 2009, at 7:01 PM, Brendan Eich wrote: The mandatory parentheses could be avoided by breaking from Python's precedent and making yield a canonical unary (that is, high-)precedence operator like delete, !, etc. But then almost any algebraic or logical expression computing the

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

2009-05-17 Thread Brendan Eich
On May 17, 2009, at 11:48 AM, Brendan Eich wrote: On May 17, 2009, at 11:00 AM, Brendan Eich wrote: Python differs from JS by having only assignment statements, not assignment expressions, which simplifies the problem a bit, as the grep output cited above shows. Of course this makes