On Mon, Mar 14, 2016 at 11:19 AM, Kevin Smith <[email protected]> wrote:
> Is there a summary of the motivation for "for-await" and "async iteration" >> in general? >> > > There's a short section at: > https://github.com/tc39/proposal-async-iteration#overview-and-motivation > Thanks > > >> Has there any discussion in not supporting "var" in "for-await" >> initializers? >> > > Symmetry with for-of is definitely an important consideration. Is there a > particular reason why you think "var" should be disallowed? > > There is not a backward compatibility concern and "var" is a smell for all the reasons that "let" was introduced (per-interation bindings don't happen, it isn't scoped to the block). (I'm unclear why "for-of" allows "var" for the same reason). I'm not convinced 100% either way, I was just wondering if it was discussed.
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

