Inline... On Wed, Mar 25, 2015 at 12:25 AM Bob Myers <r...@gol.com> wrote:
> Thanks Rick. Yes, I had been hoping to make the following work: > > x = {a: 1}; > y = {b: 2}; > z = {x.a, b.y}; // {a: 1, b: 2} > > This is not destructuring per se. > Of course, and that's not what I was exploring in attempting to extend 12.2.5.9 Runtime Semantics: PropertyDefinitionEvaluation > It's an extension to object literal property value shorthand syntax. > The idea was to derive the desired property name `a` from `x.a`. > This seems compact and readable. > > However, as you found it could be difficult to define when and how a > property name could be derived from various types of member expressions. > After more thought, I think it can be done with a set of explicit early errors that disallow a subset of MemberExpression nonterminals. Rick
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss