New private names proposal

David-Sarah Hopwood david-sarah at
Thu Dec 23 16:12:27 PST 2010

On 2010-12-24 00:02, Oliver Hunt wrote:
> As a question how do soft fields/private names interact with an object
> that has had preventExtensions called on it?

For soft fields: there is no interaction, a new soft field can be added
to an object on which preventExtensions has been called.

For private names: new names are prevented from being added.

This is a useful feature of soft fields. There is no loss of security
or encaspulation as a result, for the same reason that there is not
for adding a soft field to a frozen object. (Freezing is equivalent to
preventing extensions, marking all properties as non-Configurable, and
marking all data properties as non-Writable.)

David-Sarah Hopwood  ⚥

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 292 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the es-discuss mailing list