This extremely useful feature, which is sometimes called "picking", has been discussed extensively on the group, but the "thought leaders" (?) who apparently have the ability to kill a feature by saying "I don't really think it's that important" have failed to get excited about it, although it seems to me to be at least as "interesting" (in terms of the unwritten criteria apparently applied to determine "interesting") as many other features which are progressing through the ES39 life-cycle, and the nature of the TC39 governance process, which gives entirely new meaning to the notion of "design by committee", makes it impossible to find the champion which is the gating factor for the entire process.
Bob On Thu, Feb 8, 2018 at 3:15 PM, Yeong-u Kim <wlzla...@naver.com> wrote: > # Suggestion: Destructuring object initializer. > > ---------- > > Destructuring assignment: it extracts values by destructuring an object, > and assign _them_ to ‘variables.’ I suggest Destructuring object > initialization syntax; it is similar to Destructuring assignment, except > that it initializes an object with _the extracted values_. > > ```javascript > const name_info = {"first name": "Yeong-u", "last name": "Kim", nickname: > "K."}; > const e = "computed property name"; > > const object = { > name: { > *{"first name": forename, "last name": surname}: name_info > }, > *[a, b, c]: [1, 2, 3], > *[d]: [4], > [e]: "This is not part of the syntax" > *[{"some property name": "new one"}]: [{"some property name": 5}], > *{gettable: something}: {get gettable() {return Symbol("Using [[Get]]");}} > }; > /* > { > name: { > forename: "Yeong-u", > surname: "Kim" > }, > a: 1, > b: 2, > c: 3, > d: 4, > "computed property name": "This is not part of the syntax", > "new one": 5, > something: Symbol(Using [[Get]]) > } > */ > ``` > > ---------- > > I would appreciate hearing your opinion on this. > > > _______________________________________________ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss