ToPropertyDescriptor and [[DefineOwnProperty]], regarding Object.defineProperty
Mark S. Miller
erights at google.com
Mon Jun 1 13:47:12 PDT 2009
On Mon, Jun 1, 2009 at 12:40 PM, Jeff Walden
<jwalden+es at mit.edu<jwalden%2Bes at mit.edu>
> I don't see the point in making fields of property descriptors omittable.
The point is exactly so that absent descriptor fields can default to their
existing values when re-defining an already existing property, but default
to canonical values (false or undefined) when defining a new property.
A different factoring that I've toyed with would split [[DefineOwnProperty]]
into two distinct phases: 1) use existing property settings to flesh out
partial property descriptor arguments into "fully populated" property
descriptors. 2) Do all the acceptance testing and mutation using only these
fully populated descriptor arguments.
In the end, I refrained from suggesting it because I concluded it did not
result in any net simplification of the overall spec.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss