Allen Wirfs-Brock (2013-05-14T15:28:27.000Z)
github at esdiscuss.org (2013-07-12T02:27:20.719Z)
On May 14, 2013, at 8:12 AM, Andreas Rossberg wrote: > Not sure about having two names for the same method, but if so, why > not simply make `Generator.prototype.resume === Generator.prototype.next`? It could me done that way. I'm not so sure it is such a good practice. GeneratorFunctions are constructors and hence each one provide a unique prototype object for all its instances. So, conceivably a developer can over-ride either or both of `next` and `resume` for a particular family of generators. Specify one as explicitly delegating to the other in the "superclass" makes it clearer which method you need to over-ride if you want to modify both `next` and `resume` behavior. Otherwise, you would always have to remember to over-ride both.