Updated MDN: https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/defineProperty#Description
Hope it's fine, feel fere to edit/add/change that, thanks On Thu, Nov 29, 2012 at 12:23 PM, Andrea Giammarchi < [email protected]> wrote: > I will ... but I still would like to know why other developers are using > inheritance for this. > > No memory, performance, size, benefits and more verbose code, i.e. > > Object.defineProperty(o, p, Object.create(null, {value:{value:v}})) > > OR > > Object.defineProperty(o, p, new DefaultDescriptor(v)); > > VS > > Object.defineProperty(o, p, {value:v}) > > So, let's say I am starting evangelizing this here. > > br > > > > On Thu, Nov 29, 2012 at 11:16 AM, Brendan Eich <[email protected]>wrote: > >> Andrea Giammarchi wrote: >> >>> I really don't understand what is exactly the advantage of considering >>> inherited properties for descriptors. >>> >> >> It's easy to overreact here. Don't mess with Object.prototype still >> applies, or you will have other WTF moments. >> >> ES5 shipped this and browsers shipped implementations. David and others >> use it. I don't think we can change it. >> >> The ES5 meta-object APIs are pretty much power-tools, with obvious >> verbosity and usability taxes. Better (more concise and usable) veneer on >> top has been done and should bubble up on github. This is not to excuse >> anything, but any process (standardized de-jure or not) that releases >> platform iterations to millions of developers will face this pain. Node.js >> is facing it now. >> >> So I say doc this, evangelize it, and build better APIs on top of ES5. >> TC39 people are tracking. >> >> /be >> > >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

