Existential operator (was: ||= is much needed?)
brendan at mozilla.org
Thu Jun 21 13:27:30 PDT 2012
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
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
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.
More information about the es-discuss