New private names proposal

David-Sarah Hopwood david-sarah at
Thu Dec 23 11:46:10 PST 2010

On 2010-12-23 13:53, Kevin Smith wrote:
> If I might ask a side-question:  what's the value in making an object
> non-extensible in ES5?  I understand the value of making properties
> non-configurable or non-writable, but I don't yet see a reason to prevent
> extensions.

Suppose that the object inherits properties from a parent on the prototype
chain. Then "extending" the object could override those properties, even
if they are non-configurable or non-writable on the parent. So making an
object non-extensible is necessary in order to make inherited properties
effectively non-configurable and/or 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