||= is much needed?
brendan at mozilla.org
Tue Jun 12 15:17:58 PDT 2012
Updated. Sorry, no ||| instead of ??. Instead, inspired by Wes's GCC
reminder, I kept the ?? operator but re-spelled it as ?: and made ??= be
The semantics match only undefined. APIs use null as no-object and do
not want to trigger defaulting, here or with parameter default values.
This reminds me: IIRC we need to agree that an explicit undefined actual
argument triggers defaulting for parameter default values (as it would
if the pdv-based code were rewritten to use ?: or ?=).
Brendan Eich wrote:
> Brendan Eich wrote:
>> LeftHandSideExpression ?= AssignmentExpression
>> are roughly
>> Let lref = evaluate A.
>> Let lval = GetValue(lref).
>> Let rref = evaluate B.
> Of course, A should be LeftHandSideExpression and B should be
> This is pretty simple. We could even grant an exception and get it
> into ES6, IMHO. But first it needs a strawman and some discussion.
> Absent fast objections here, I'll co-opt the
> strawman and put it on the agenda.
> es-discuss mailing list
> es-discuss at mozilla.org
More information about the es-discuss