RE: Async iteration
From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Isiah Meadows > By the way, I think observables are getting more headway than async > generators. This is very inaccurate. They have gotten more conference talks, but not more committee headway. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss
Re: Async iteration
I'm referring to async generators primarily, though. And observables do have the forEach method to listen and iterate with. On Tue, Mar 15, 2016, 08:46 Benjamin Gruenbaum <ing...@gmail.com> wrote: > Observables and async iterators are not at-odds. The two proposals > complement each other and address two sides of the same coin (pull and > push). > > I'm also not sure what "headway" means here but a few months ago the > observable counterpart to using the `async for` loop - the for.. on loop > proposed by Jafar has been (possibly temporarily) scrapped in favor of > async iteration with async iterators. > > On Tue, Mar 15, 2016 at 2:26 PM, Isiah Meadows <isiahmead...@gmail.com> > wrote: > >> By the way, I think observables are getting more headway than async >> generators. >> >> https://github.com/zenparsing/es-observable >> >> On Mon, Mar 14, 2016, 16:01 Benjamin Gruenbaum <ing...@gmail.com> wrote: >> >>> I would be super surprised if I could use `var` everywhere _except_ >>> async iteration. >>> >>> So I'd say consistency triumphs. Same reason all the ES2015 features >>> exist in non-strict mode. >>> >>> Also, you might want to look at the async/await pep for why Python has >>> added async iteration in 3.5 >>> >>> On 14 Mar 2016, at 20:29, John Lenz <concavel...@gmail.com> wrote: >>> >>> >>> On Mon, Mar 14, 2016 at 11:19 AM, Kevin Smith <zenpars...@gmail.com> >>> 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 >>> es-discuss@mozilla.org >>> https://mail.mozilla.org/listinfo/es-discuss >>> >> > ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss
Re: Async iteration
Observables and async iterators are not at-odds. The two proposals complement each other and address two sides of the same coin (pull and push). I'm also not sure what "headway" means here but a few months ago the observable counterpart to using the `async for` loop - the for.. on loop proposed by Jafar has been (possibly temporarily) scrapped in favor of async iteration with async iterators. On Tue, Mar 15, 2016 at 2:26 PM, Isiah Meadows <isiahmead...@gmail.com> wrote: > By the way, I think observables are getting more headway than async > generators. > > https://github.com/zenparsing/es-observable > > On Mon, Mar 14, 2016, 16:01 Benjamin Gruenbaum <ing...@gmail.com> wrote: > >> I would be super surprised if I could use `var` everywhere _except_ async >> iteration. >> >> So I'd say consistency triumphs. Same reason all the ES2015 features >> exist in non-strict mode. >> >> Also, you might want to look at the async/await pep for why Python has >> added async iteration in 3.5 >> >> On 14 Mar 2016, at 20:29, John Lenz <concavel...@gmail.com> wrote: >> >> >> On Mon, Mar 14, 2016 at 11:19 AM, Kevin Smith <zenpars...@gmail.com> >> 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 >> es-discuss@mozilla.org >> https://mail.mozilla.org/listinfo/es-discuss >> > ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss
Re: Async iteration
By the way, I think observables are getting more headway than async generators. https://github.com/zenparsing/es-observable On Mon, Mar 14, 2016, 16:01 Benjamin Gruenbaum <ing...@gmail.com> wrote: > I would be super surprised if I could use `var` everywhere _except_ async > iteration. > > So I'd say consistency triumphs. Same reason all the ES2015 features exist > in non-strict mode. > > Also, you might want to look at the async/await pep for why Python has > added async iteration in 3.5 > > On 14 Mar 2016, at 20:29, John Lenz <concavel...@gmail.com> wrote: > > > On Mon, Mar 14, 2016 at 11:19 AM, Kevin Smith <zenpars...@gmail.com> > 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 > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss
Re: Async iteration
I would be super surprised if I could use `var` everywhere _except_ async iteration. So I'd say consistency triumphs. Same reason all the ES2015 features exist in non-strict mode. Also, you might want to look at the async/await pep for why Python has added async iteration in 3.5 > On 14 Mar 2016, at 20:29, John Lenz <concavel...@gmail.com> wrote: > > > On Mon, Mar 14, 2016 at 11:19 AM, Kevin Smith <zenpars...@gmail.com> 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 es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss
Re: Async iteration
On Mon, Mar 14, 2016 at 11:19 AM, Kevin Smith <zenpars...@gmail.com> 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 es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss
Re: Async iteration
> > 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 > 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? ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss
Async iteration
Two things: Is there a summary of the motivation for "for-await" and "async iteration" in general? Has there any discussion in not supporting "var" in "for-await" initializers? ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss