Existential operator (was: ||= is much needed?)

Brendan Eich brendan at mozilla.org
Thu Jun 21 08:25:11 PDT 2012


Brendan Eich wrote:
> Thus foo?.bar.baz.quux is really (((foo?.bar).baz).quux). 

So (as many have noted) parenthesization does not call GetValue in ECMA-262:

11.1.6 The Grouping Operator

The production PrimaryExpression : ( Expression ) is evaluated as follows:

1. Return the result of evaluating Expression. This may be of type 
Reference.

NOTE This algorithm does not apply GetValue to the result of evaluating 
Expression. The principal motivation for this is so that operators such 
as delete and typeof may be applied to parenthesised expressions

/be


More information about the es-discuss mailing list