April 10 2014 Meeting Notes
brendan at mozilla.org
Sun Apr 27 11:19:04 PDT 2014
Mark S. Miller wrote:
> BTW, return() should be idempotent. Is it?
> Since .return takes an argument whose value is observable, I think not.
> Hmmm. This is interestingly similar to multiple calls to resolve.
Yes, and note that Python's generator.close (no return value parameter,
recall it throws a built-in exception, GeneratorExit, at the generator
iterator) is idempotent. Calling it on a closed generator is a no-op.
This may be important for optimizability. Allen's speculation is that
JITs can sort out early from "done" loop termination paths and
maybe-call return only in the early cases, but I'm not so sure.
More information about the es-discuss