That First Next Argument

Brendan Eich brendan at
Fri Aug 22 12:14:43 PDT 2014

Kevin Smith wrote:
>      don't want to get last yielded-value, that is a GC-leak honey trap; 
> Can you elaborate?

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.


More information about the es-discuss mailing list