ToPropertyDescriptor and [[DefineOwnProperty]], regarding Object.defineProperty

Jeff Walden jwalden+es at MIT.EDU
Mon Jun 1 13:31:22 PDT 2009

On 1.6.09 13:24, Mike Shaver wrote:
> On Mon, Jun 1, 2009 at 3:40 PM, Jeff Walden<jwalden+es at>  wrote:
>> I don't see the point in making fields of property descriptors omittable.
> At some point we'll need to deal with that, if future standards or
> non-standard extensions from implementors add new fields and we wish
> for existing scripts to continue to work.
> That said, I think it will be extremely confusing to developers if
> these ostensibly-boolean fields are really tri-state (true, false,
> unspecified), so it seems like they should default to one of the true
> or false behaviours?

Note the footnote: I was referring to the spec type, not to an object describing a property descriptor provided by JS code.   That omitted properties on such objects (even extension properties) be treated as if they were set to their default values was precisely what I was requesting.

I was also asked in IRC discussion how an omitted property is different from having a certain value, and the most obvious place where that matters is 8.12.10 step 5, for the case Object.defineProperty({}, "foo", {}) -- a case whose utility seems extremely suspect.


More information about the es-discuss mailing list