From: es-discuss <[email protected]> on behalf of Brendan Eich
<[email protected]>
> 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?
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss