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

Brendan Eich brendan at mozilla.com
Mon May 18 10:23:50 PDT 2009

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(wahhh); -- a sign of weakness in the old days, among  
kernel hackers :-P.

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. Obviously the issue would go  
away if the precedence where the same as delete and typeof. Hence  
"kind of".


More information about the es-discuss mailing list