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

Herby Vojčík herby at mailbox.sk
Thu Jun 21 13:42:45 PDT 2012

Brendan Eich wrote:
> Herby Vojčík wrote:
>> That I cannot envision... but Null Pattern object that produces itself
>> for all operations ([[Get]], [[Call]], ...) should not be problematic.
> You might be surprised (I am) by how seemingly innocent things can
> become problematic.
> Just on aesthetic grounds, I bet TC39ers will react to this the way we
> react to document.all that masquerades as undefined.
> BTW, "Pattern" and "Null" are both not good words to join to name this

I just named it on the grounds of the (non-GoF) design pattern which is 
called "Null Object" or "Null Pattern", if I am not mistaken. But of 
course naming is not that important.

> thing. A pattern matching strawman exists, wherein patterns are special
> forms, built from destructuring patterns, used in certain syntactic
> forms but not first-class objects. And Null is to close to null and the
> ECMA-262 internal Null type.
> As a Unix hacker I can dig the /dev/null reference, if there is one, but
> it's too far afield.
> I do think Smalltalk's nil, even though not identical, suggests a better
> name. If we were to expose this singleton, we could do worse than call
> it something "the Nil object". But I'm not sold on exposing it.
> Allen (and Mark if he has time) should weigh in.
> /be

More information about the es-discuss mailing list