Mark S. Miller (2015-01-28T06:02:49.000Z)
On Tue, Jan 27, 2015 at 7:22 PM, Brendan Eich <brendan at mozilla.org> wrote:

> Mark S. Miller wrote:
>
>> The reason why the intent is unwarranted is that the descriptor omits
>> "configurable:" rather than explicitly saying "configurable: true". If the
>> owner object already has a configurable own property of the same name, then
>> a defineProperty where the "configurable:" is omitted defines an own
>> property preserving the configurability of the original own property.
>>
>
> Wild, and genius.


(blush)



> How many more narrow escapes can we make and keep both web compat and
> integrity? :-P
>

How many will we need? ;)



>
> Is there any downside? What is the bad case that observably changes
> behavior, if any (not involving proxies)?


You get the following non-intuitive but allowed behavior.

if (!hasOwnProperty(W, P)) {
  defineProperty(W, P, { value: V })
  console.log(getOwnPropertyDescriptor(W, P).configurable); // true
}

However, you could also get this behavior if W is a proxy, so it doesn't
introduce any new cases beyond what's already possible. It is only
surprising.

That's not much of a downside, and I can't think of any other downside.


I'm too tired to search the state space right now, throwing this out as a
> challenge.



-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150127/e4476e66/attachment.html>
d at domenic.me (2015-01-28T19:11:25.305Z)
On Tue, Jan 27, 2015 at 7:22 PM, Brendan Eich <brendan at mozilla.org> wrote:

> Wild, and genius.


(blush)



> How many more narrow escapes can we make and keep both web compat and
> integrity? :-P
>

How many will we need? ;)



> Is there any downside? What is the bad case that observably changes
> behavior, if any (not involving proxies)?


You get the following non-intuitive but allowed behavior.

```js
if (!hasOwnProperty(W, P)) {
  defineProperty(W, P, { value: V })
  console.log(getOwnPropertyDescriptor(W, P).configurable); // true
}
```

However, you could also get this behavior if W is a proxy, so it doesn't
introduce any new cases beyond what's already possible. It is only
surprising.

That's not much of a downside, and I can't think of any other downside.


I'm too tired to search the state space right now, throwing this out as a challenge.
d at domenic.me (2015-01-28T19:11:11.330Z)
On Tue, Jan 27, 2015 at 7:22 PM, Brendan Eich <brendan at mozilla.org> wrote:

> Wild, and genius.


(blush)



> How many more narrow escapes can we make and keep both web compat and
> integrity? :-P
>

How many will we need? ;)



> Is there any downside? What is the bad case that observably changes
> behavior, if any (not involving proxies)?


You get the following non-intuitive but allowed behavior.

```js
if (!hasOwnProperty(W, P)) {
  defineProperty(W, P, { value: V })
  console.log(getOwnPropertyDescriptor(W, P).configurable); // true
}
```

However, you could also get this behavior if W is a proxy, so it doesn't
introduce any new cases beyond what's already possible. It is only
surprising.

That's not much of a downside, and I can't think of any other downside.


I'm too tired to search the state space right now, throwing this out as a