It seems to me that generators are not the best mechanism to express
resource management ("abstract over expensive resources") because the
programmer of the generator can never guarantee that the consumer will
exhaust it.  If we want direct language support for resource management,
then a proposal should be crafted to add that as a distinct feature.

Also, in my opinion it is way too late in the ES6 lifecycle for us to be
discussing protocol changes like this.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to