April 10 2014 Meeting Notes
Domenic Denicola
domenic at domenicdenicola.com
Thu Apr 24 12:30:57 PDT 2014
From: es-discuss <es-discuss-bounces at mozilla.org> on behalf of Brendan Eich <brendan at mozilla.org>
> No one is talking seriously about such a change.
Why not? It seems like you'd want to perform any return-related "cleanup" just as clearly when you were doing `[...iterable]` or `Promise.all(iterable)`. What makes `for`-`of` special?
Making the change only to `for`-`of`, and not all the other iterations in the spec, would preclude e.g. implementing `Promise.all` or `Array.from` in terms of `for`-`of`.
Indeed, this seems related to other claims in the thread that, if `for`-`of` gets special-case `try { ... } finally { /* call return */ }` behavior, then people will be advised not to use `for`-`of`. Either because of a performance penalty, or because of the fact that it acts unlike every other iteration protocol use in the language and adds additional weird semantics.
Am I missing something that makes the `for`-`of`--only modification more coherent?
More information about the es-discuss
mailing list