On May 4, 2009, at 9:35 PM, Garrett Smith wrote:

In previous discussion of ES4 (now obsolete), someone (Brendan?)
mentioned ||= and &&= short-circuit operators. I was interested, but
have heard nothing further on the topic.

Was the idea abandoned?

Not at all, but some discussion involving ??= instead kind of trailed off. See

https://mail.mozilla.org/pipermail/es5-discuss/2008-August/ thread.html#502

I think ||= makes sense given the extant JS idiom: var foo = arg || defaultFoo; that is widely used.

&&= doesn't have a real-world use-case.

??= and ?? are too narrowly typed for JS.

/be

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to