Proposal: Object.defineProperty shorthand

Mike Shaver mike.shaver at
Thu May 26 14:06:47 PDT 2011

On Thu, May 26, 2011 at 11:54 AM, Sean Eagan <seaneagan1 at> wrote:
> 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.

I don't understand how that could work.  By the time you get the
runtime error (trying to increment a boolean value), we have already
performed a property access, which can have side-effects.  More
practically, an engine would have to reconstruct the original
syntactic form from the runtime result.

addto(c, not(get(a, "b")))


More information about the es-discuss mailing list