Proposal: Object.defineProperty shorthand

Sean Eagan seaneagan1 at
Thu May 26 11:54:55 PDT 2011

On Thu, May 26, 2011 at 1:43 PM, Mike Shaver <mike.shaver at> wrote:
> On Thu, May 26, 2011 at 11:37 AM, Sean Eagan <seaneagan1 at> wrote:
>> // ! implies non-writable, ~ implies non-enumerable
>> // all assignment operators can be used
>> ! a.b += c
> Legal parse today, though I'm not sure you can get runtime semantics
> that aren't an error.

Correct, I was intending for it to no longer be an error.

>> !~a.b++
>> !(~(a.b++))
> Legal expressions today with valid meanings.

Yes, I was trying to show that this shorthand would not be applicable
to postfix expressions unless you prefix with #.  Since that could be
confusing, we could just make it never work with postfix expressions


Sean Eagan

More information about the es-discuss mailing list