On May 14, 2012, at 9:53 AM, Brendan Eich wrote:

> From where is this produced? It's unsound if from MemberExpression (ES1-5) or 
> PrimaryExpression (ES6) -> FunctionExpression -> ... ConciseBody.

AssignmentExpression :
   ...
   ArrowFunction

ArrowFunction :
   ArrowParameter => ConciseBody




> 
> /be
> 
> Erik Arvidsson wrote:
>> The latest ES6 draft introduced the notion of a concise function body
>> and it is being used for arrow functions as well as for methods and
>> set/get accessors.
>> 
>> Grammar:
>> 
>> ConciseBody :
>>   [lookahead does not include { ] AssignmentExpression
>>   { FunctionBody }
>> 
>> Example:
>> 
>> var object = {
>>   get x() this._x,
>>   set x(v) this._x = v,
>>   method() this._x
>> };
>> 
>> I don't remember us ever discussing this change?
>> 
>> Personally I think it makes things more consistent since concise
>> function bodies are allowed in ArrowFunction but I've heard people
>> complain about it already.
>> 
>> p.s. Allen, the spec draft has a bunch of ConsiseBody typos.
>> 
> 

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to