Spread and non objects

Brendan Eich brendan at mozilla.com
Fri Nov 5 18:30:30 PDT 2010


On Nov 5, 2010, at 6:19 PM, Erik Arvidsson wrote:

> On Fri, Nov 5, 2010 at 17:46, Brendan Eich <brendan at mozilla.com> wrote:
>> You mean
>> 
>>  f(1, 2, ...(x || []))
>> 
>> at least.
> 
> No need for the parens here [*]. Do you want it for readability?

Maybe. Or a space. It's unusual to have a low precedence prefix operator that can run right into its operand without any spacing or parentheses.

yield is one example but it must be followed by a space or some kind of left parenthesis or bracket.


> [*] http://wiki.ecmascript.org/doku.php?id=harmony:spread#syntax

Thanks for editing this.

The issue remains: EIBTI vs. "consistency" with F.p.apply. I don't think "JS has implicit conversions" as a general rule should weigh in -- we are trying to live that down, so we need a strong, more specific reason.

/be


More information about the es-discuss mailing list