Bob Myers (2018-01-25T05:53:49.000Z)
rtm at gol.com (2018-01-26T04:04:03.338Z)
> Destructuring made it possible to flatten 3-5 lines to 1, along with the ability to provide defaults. Yet, as an aside, this "principle" of "flattening" being a sufficient or at least necessary condition for syntax proposals, is itself not applied consistently, as seen in the "rejection" (if lack of positive response on this mailing list can be deemed "rejection") of the proposed property-picking syntax, which allows one to replace three lines ``` const {a, b} = foo; const {c, d} = bar; return {a, b, c, d}; ``` with one: ``` return { {a, b} = foo, {c, d} = bar }; ``` Actually, by the way, destructuring is of course about more than brevity. It mitigates a common type of typo-related bug: ``` const misspelledProp = foo.mispeledProp; ``` Bob