On Oct 13, 2011, at 8:36 AM, Brendan Eich wrote:
> On Oct 12, 2011, at 5:28 PM, Dean Landolt wrote:
>
>
>> But this reminds me -- has anyone proposed a method shorthand for generators?
>
> Yes, it's easy:
>
> var x = {
> *foo() { yield ... }
> }
>
> The * goes after 'function' and before the optional name, in the current
> proposal. So for method shorthand, where there is no 'function' but there
> must be a name, the * goes before the generator method's name.
This is something that I'm been meaning to bring up:
var x = {
#*foo() {yield }
};
Not necessarily a parsing problem but there has been push back against
sequences of property prefixes.
>
> This is yet another problem (after [computedNameExpr]:...) for making commas
> optional, as discussed.
I'm not sure that either is really a serious usability issue, but I agree that
it's on my plate to demonstrate otherwise.
Allen
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss