Nathan White wrote:
Am I crazy to think that "Nil" could allow the Existential Operator to be used in assignments as well?

var a = undefined;
a?.b?.c?.d = 1;
console.log(a); // {b: {c: {d: 1}}}

Too powerful / abusive?

Too error-prone. E4X (ECMA-357) and languages such as Borland's mid-nineties "Lucy" (Loose C) allow you to cons up deep structures just be expressing member references. One typo and you're lost.

Day dreaming, use U+02D9 (DOT ABOVE) as the operator.

a˙b˙c.d

Object literal notation is explicit and pretty concise. What's the hot use-case driving your desire here?

/be
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to