Generator return() and exceptions

Brendan Eich brendan at
Wed Jul 23 15:13:05 PDT 2014

Allen Wirfs-Brock wrote:
> Maybe that made sense in the absence of return() but now that we have return ().  yield* is really just a loop that the throw() is terminating early.  From that perspective it seens we should invoke return() and not throw on the inner iterator.

Good point, sorry I missed that critical * in your earlier post.


More information about the es-discuss mailing list