On May 19, 2009, at 2:08 PM, David-Sarah Hopwood wrote:

A more explicit alternative is to require some kind of decoration on the
function definition, e.g. (just a straw man):

 function generator foo() { ... }

Or just (we discussed this briefly last summer in Oslo):

generator foo() { ... }

In JS1.7, we followed Python, which uses def, same as for defining a function, and distinguishes generators by presence of yield (which makes value returns illegal). It seems unwise to diverge from Python without more evidence of an actual usability problem. We have no such evidence from shipping JS1.7 and up in Firefox 2 and up.

/be

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to