+1 on arrowed generators! Have being actively using generators last month &
have being wishing they could be like arrows, although syntax I've being
thinking of was
(x, y) *> { .... }
BTW given that generators are used as a method on iterators wouldn't it
make sense to consider syntax for generator members in a classes syntax ??
My hope is in ES6 we would just use class syntax for methods & arros for
functions making "function" a legacy
On Monday, November 18, 2013, Brendan Eich wrote:
> Ѓорѓи Ќосев wrote:
>
>> Its harder to scan whether this is a generator arrow function or a normal
>> arrow function because the star is too far away:
>>
>> someFunction(*(someArgument, anotherArgument) => {
>> ... code ...
>> });
>>
>> compared to this form, where its immediately obvious that this is not a
>> regular function, just by looking at the composed symbol (arrow-star)
>>
>> someFunction((someArgument, anotherArgument) =>* {
>> ... code ...
>> });
>>
>
> I buy it. This is what I'll propose next week as concrete syntax. It's a
> small point, but the rationale is "the star goes after the first token that
> identifies the special form as a function form." For generator functions,
> that token is 'function'. For arrows, it is '=>'.
>
> /be
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
--
Regards
--
Irakli Gozalishvili
Web: http://www.jeditoolkit.com/
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss