On object extension

Jake Verbaten raynos2 at gmail.com
Mon Nov 28 12:00:39 PST 2011


> First, if obj already has a non-configurable property 'a', this will
throw

I don't think object extension on a non configurable properties should be a
no op.

Your basically saying "extend obj with { a: 1 } unless doing so would throw
an error, in which case fail silently"

Personally I don't like silent failure points.

> Another feature which could be handy is extending an object with another
already existing object (aka mixins?).

Having some kind build in API to mixin / extend objects would indeed be
helpful
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111128/5a30e7fe/attachment.html>


More information about the es-discuss mailing list