Re: Computed Property Name Shorthand Proposal

2015-08-30 Thread Herby Vojčík
Alexander Jones wrote: That's exactly what this is. I appreciate the beauty in symmetry, but I think -1. I second this. On 27 August 2015 at 17:25, Kevin Smith zenpars...@gmail.com mailto:zenpars...@gmail.com wrote: I'd expect the following to work, given that the prop expression

Re: Computed Property Name Shorthand Proposal

2015-08-28 Thread Alexander Jones
That's exactly what this is. I appreciate the beauty in symmetry, but I think -1. On 27 August 2015 at 17:25, Kevin Smith zenpars...@gmail.com wrote: I'd expect the following to work, given that the prop expression evaluates to 'bar', and bar is in context. var foo = 'bar' var bar =

Re: Computed Property Name Shorthand Proposal

2015-08-27 Thread Jeremy Martin
I'm usually lousy at interpreting the spec (yet here I go!), but I think the behavior is explained here [1]: PropertyDefinition[Yield] : IdentifierReference[?Yield] CoverInitializedName[?Yield] PropertyName[?Yield] : AssignmentExpression[In, ?Yield] MethodDefinition[?Yield]

Re: Computed Property Name Shorthand Proposal

2015-08-27 Thread Kevin Smith
I'd expect the following to work, given that the prop expression evaluates to 'bar', and bar is in context. var foo = 'bar' var bar = 'ponyfoo' var baz = { [foo] } console.log(baz) // - { bar: 'ponyfoo' } Hmmm... I'm not sure I would expect any such thing. It seems like you're