A big thing in a programming language for me is "glanceability" (ability to glance at code and discern roughly what's going on).
Allowing destructuring braces to be mixed in object literals may well be a natural extension of destructuring: I'm not denying that. I just think that since they unfortunately share the same symbols for different-meaning things, I think that a reader of the code may accidentally misunderstand the structure of the object literal and presume to access its properties wrongly, leading to a bug and wasted time. This for me is a counter-rationale for the (or any new) feature in the language. However, if it was more visually discernable, then it wouldn't have this issue. On Mon, 12 Feb 2018 at 05:24 Jerry Schulteis <[email protected]> wrote: > I had the same concern at first about confusing the destructuring braces > with a nested object literal. After looking at it some more it seems like a > natural extension of destructuring assignment. > >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

