On Oct 13, 2011, at 3:00 PM, Allen Wirfs-Brock wrote:

> 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 }

It seems to me the order should be *# since with generator functions, the * 
goes after the function keyword, with best style favoring no space to left of 
*, one space to right.

Also, in HoMD, I made # an identifier prefix.


> };
> 
> Not necessarily a parsing problem but there has been push back against 
> sequences of property prefixes.

That may be an edge case we can live with. That it could be done doesn't mean 
it will be done often enough to make for Beetle Bailey appearances.


>> 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.

Thanks,

/be
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to