Generator Arrow Functions

Axel Rauschmayer axel at rauschma.de
Wed Nov 20 03:22:46 PST 2013


> +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 ??

It’s already in the spec: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generator-function-definitions

> My hope is in ES6 we would just use class syntax for methods & arros for functions making "function" a legacy

My hope, too.

-- 
Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131120/6d35f391/attachment.html>


More information about the es-discuss mailing list