1. Take a look at https://esdiscuss.org/topic/pick-operator. 2. Do keep in mind syntax additions tend to have a steep usefulness requirement in practice (e.g. Async functions) to make it into the language. And most definitely check out https://esdiscuss.org/topic/the-tragedy-of-the-common-lisp-or-why-large-languages-explode-was-revive-let-blocks.
Not saying this is a bad thing to add, but I'm skeptical on how likely it is to get accepted. Isiah Meadows [email protected] On Sat, Mar 5, 2016 at 5:57 AM, Bob Myers <[email protected]> wrote: > Extended dot notation is a proposal for a new syntax for picking properties > into objects. The canonical example is > > ```js > let o1 = { a: 1, b: 2}; > let o2 = o1.{a}; // {a: 1} > ``` > > You may think of this as deconstructing objects into objects, rather than > variables. > > Syntactically, the extended dot notation is the dot followed by something in > curly braces. This avoids eating up another precious special symbol, yet is > unambiguous since at present only an identifier can follow a dot. > > I've put together a short introduction at > https://github.com/rtm/js-pick-notation/blob/master/docs/intro.md. This > repository also contains a full spec at > https://github.com/rtm/js-pick-notation/blob/master/js-pick-notation.md. The > spec includes a section on motivation, which in a nutshell is expressiveness > and brevity. The repo also features a proof-of-concept implementation using > sweet.js. > > A variant of the proposal uses `#` instead of `.`, the pros and cons of > which are discussed in the spec. > > I won't repeat details from the introduction here, but there are more > features of interest, including picking into arrays, pickers as functions, > etc. > > I'm looking for good feedback as well as a champion for this feature. > > -- > Bob Myers > > > > > > > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss > _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

