The Existential Operator

Claude Pache claude.pache at
Thu May 22 10:17:24 PDT 2014

Le 21 mai 2014 à 01:30, Andrea Giammarchi <andrea.giammarchi at> a écrit :

> FWIW I think having silent failures all over is not desirable so I'd like to know what's the concrete claimed need for this, if that's possible. (I've only read there's a need but I don't find the rationale)

The point of the Existential Operator in general, and of the details of its semantics in particular, is not to fail silently (although it can be abused for that), but to have a compact syntax for concrete cases where you must be prepared to receive either null/undefined or an object (as it happens when working with the DOM), and want to yield another value using a definite algorithm (accessing properties, invoking methods). Or do you think to a precise detail of the semantics of the Existential Operator, where silent failures are encouraged?


More information about the es-discuss mailing list