On Oct 7, 2011, at 9:13 AM, Juan Ignacio Dopazo wrote: > > On Fri, Oct 7, 2011 at 12:34 PM, Axel Rauschmayer <[email protected]> wrote: > I would prefer the name Object.copyOwnPropertiesTo(source, target) or > Object.copyOwnTo(source, target) to the name “extend” (which, to me, suggests > inheritance). >
Just to provide some background. Though process that went into choosing the names in ES5 was that functions that were viewed as meta level operations that would primarily be used by fairly sophisticated library designers were given long multiword names, eg Object.getOwnPropertyNames. Functions that were viewed as application level operations that would be widely used by app developers where given short names, eg Object.keys and Object.create. The assumption was that the meta level operations would be used by library writers to create new app level operations that normally would have short everyday names. Also, the long names minimized the chance that the names would conflict with existing libraries or applications. Axel's name seems consistent with that model. However, my perceptions is that they will be unacceptable to many vocal members of our community. Allen > -- > Dr. Axel Rauschmayer > > I also think Object.extend suggests inheritance. Other possibilities would be: > > Object.merge() > Object.mix() // Prior art: YUI's Y.mix() > > There is also the question about whether this new function would overwrite > already existing properties or not. > > > Juan > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

