>
>
>     =>, *=>, !=>
>     =>, =*>, =!>
>     =>, *>, !>
>
> Which do you hate least?
>

Hate is such a strong world...  : )

My aesthetic judgement is that "!" is not a good choice because grawl is
bad for beginners.  And async functions will touch beginners quite heavily
(I predict).


>
> Btw, Kevin, I have read and do not understand your argument about why we
> would not want generator arrow functions but would want async arrow
> functions. If we could agree on syntax, I still want both.
>
>
Let me restate first.

At a conceptual level, arrows are mappings.  "x goes to whatever".  That is
the niche they fill.  That's why they are so beautifully suited to, for
example, array iteration functions, promise callbacks, and even event
listeners (which can be considered mappings to void).

Async arrows fit right into that niche, except asynchronously.  "x goes to
Promise<whatever>".  They will be well-suited to event listeners, in
particular.  (See my OP for an example.)

Generators, on the other hand, are a way of implementing a sequence.  As
such, they don't fit into that "arrow" niche.

But aren't async functions going to be implemented with generators,
basically?  Well, yes, but that's just an implementation detail.
 Generators will probably be used to implement async functions, but they
are completely different at a conceptual level.

I believe that once we have async functions (and async arrows), the need
for a lightweight generator syntax will largely evaporate.

Or to put the question on more utilitarian ground:  given async functions
and async arrows, what use cases are left for generator arrows?
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to