More [[DefineOwnProperty]]

Allen Wirfs-Brock Allen.Wirfs-Brock at
Tue Jun 9 10:50:50 PDT 2009

>-----Original Message-----
>From: es-discuss-bounces at [mailto:es-discuss-
>bounces at] On Behalf Of Jeff Walden
>Sent: Monday, June 08, 2009 6:14 PM
>To: es-discuss at
>Subject: More [[DefineOwnProperty]]
>In Array's [[DefineOwnProperty]], what is the rationale for calling the
>default [[DefineOwnProperty]] with a Throw argument specified as false,
>rather than the Throw provided to the initial call?

False is passed because this call will always succeed if all the other invariants of the specification are maintained.

Arguably a clarifying note might be a good idea or Throw could be passed with on net change to the semantics.

>In step 6, does "same value" mean the SameValue spec operation?  If so
>the expected notation should be used here.

Yes, SameValue is the intent and yes it should be written that way in the spec. 

>Since no property is guaranteed to be present, by the time we reach step
>7, we cannot rely on every property of Desc being present.  How then
>should 7a be interpreted if [[Configurable]] was missing from Desc,

If  [[Configurable]] is missing then it certainly is not true. 

>or 7b if [[Enumerable]] is missing from Desc,

If  [[Configurable]] is missing then it can not be the Boolean negation of the [[Configurable]] field of current.

>or 10a(i) if [[Writable]] is absent from Desc?

If  [[Writable]] is missing then it is not true.

The specification incorrectly assumes each is
>actually present in the property descriptor.

No, but since it appears to be a source of confusion it may be worthwhile clarify the language of the specification in this regard. 

>I believe these last concerns only further demonstrate why standalone
>[[Configurable]]/[[Enumerable]]/[[Writable]] modifications should be
>removed to their own method rather than leaving them in
>Object.defineProperty, as I requested in a previous thread.

The conclusion is based upon a false premise. Regardless, it would be take a much broader base of concern to substantially change the Object reflection API at this point in the release process of ES5.


More information about the es-discuss mailing list