That First Next Argument

Kevin Smith zenparsing at
Fri Aug 22 12:50:01 PDT 2014

> Claude suggested (yield?) or some such to get the last value passed via
> .next to the now running generator. This would not pause execution. It
> could be used to get that first-next value (this thread's subject) but it
> could also be used unwisely all over, and it would require the
> implementation to keep the last value passed to .next in a pigeon-hole per
> running generator. Hence GC-leak honey trap.

Thinking this through...  If it's some kind of keyword, then you statically
know if and where the current input value is accessed.  If it's not used at
all, then you don't need to store the value at all.  You might also be able
to early-release it based on the location of its last appearance before the
next yield.  Maybe?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list