On dropping @names

Axel Rauschmayer axel at rauschma.de
Mon Dec 3 17:47:26 PST 2012


>> let iterable = { *[iterator]() { yield 5; } };
>> 
>> Presented without comment...
> 
> I'm sorry, but I reject this kind of argument. That code is simply more concise than:
> 
>    let iterable = { [iterator]: function*() { yield 5 } };


Given that the concise notation means that ': function' is omitted, wouldn’t it be better to write:

>> let iterable = { [iterator]*() { yield 5; } };


-- 
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/20121204/a990b54b/attachment-0001.html>


More information about the es-discuss mailing list