Domenic Denicola (2014-02-09T20:49:33.000Z)
domenic at domenicdenicola.com (2014-02-17T21:16:26.336Z)
There was very active discussion, probably around 1.5 years ago, about `||=` vs. a proposed `?=` (where `x ?= y` ≈ `x = x !== undefined ? x : y`). From what I recall some of the major points of discussion were: - Should `?=` use `undefined` as its sentinel, or work with either `null` or `undefined`? (This was before the behavior for default parameters was decided.) - Would adding `||=` be an attractive nuisance, when people "should" be using `?=` instead? - Given the existence of default parameters, and default destructuring values, are either of these even necessary? The last point, I think, was what killed both `?=` and `||=`. They become much less necessary when you can write things like ```js function f(foo = true, { bar = 5, baz = "ten" } = {}) { console.log(foo, bar, baz); } ```