April 10 2014 Meeting Notes

Allen Wirfs-Brock allen at wirfs-brock.com
Thu Apr 24 15:22:04 PDT 2014

On Apr 24, 2014, at 2:33 PM, Mark S. Miller wrote:

> Excellent. Given that, how realistic is the performance concern for the non-exceptional situation? Where is the overhead?

the body of the for-of loop could directly or indirectly throw an exception or contain a break.The break can presumably be statically detected and cleanup handled by the break logic.  But the loop still needs the equivalent of a finally around it, just in case an exception is thrown from the body.  It's hander needs to invoke @@return on the generator.

The point of debate is the cost of setting up that finally-equivalent, potentially for every for-of loop. The argument is that for some/most(??) current implementations there is significant runtime overhead to this setup.  The contra argument is that there are technique that have zero to very low setup costs and that implementations may need to evolve to use them.


More information about the es-discuss mailing list