instantiating generators

Axel Rauschmayer axel at
Fri Mar 15 12:41:11 PDT 2013

Ah, methods are more tricky! Then you have `this` to contend with.

On Mar 15, 2013, at 20:02 , Brandon Benvie <bbenvie at> wrote:

> On 3/15/2013 11:51 AM, Allen Wirfs-Brock wrote:
>> On Mar 15, 2013, at 11:22 AM, Axel Rauschmayer wrote:
>>> I would prefer having to use `new` (but don’t have strong feelings about it): generators are more like constructors than like functions. When I first started experimenting with them in Firefox, it took me a while to figure that out (even though it is obvious in hindsight). With `new`, I’d probably have figured it out quicker.
>> My experience was similar.
> Mine was as well. Admittedly it's kind of odd to use something like `new obj.method` but it does more accurately describe what it was going on.
> _______________________________________________
> es-discuss mailing list
> es-discuss at

Dr. Axel Rauschmayer
axel at


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list