Proposal: Object.defineProperty shorthand
mike.shaver at gmail.com
Thu May 26 14:06:47 PDT 2011
On Thu, May 26, 2011 at 11:54 AM, Sean Eagan <seaneagan1 at gmail.com> wrote:
> On Thu, May 26, 2011 at 1:43 PM, Mike Shaver <mike.shaver at gmail.com> wrote:
>> On Thu, May 26, 2011 at 11:37 AM, Sean Eagan <seaneagan1 at gmail.com> 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