Object.mixin rather than Object.getOwnPropertyDescriptors
claude.pache at gmail.com
Tue Apr 22 10:27:31 PDT 2014
There has been request to add `Object.getOwnPropertyDescriptors` (plural) to the standard. Reviewing use cases presented in thread  or in older thread , it seems to me that all of them boil down to copy all own properties of one object to another, e.g.,
However, this is exactly what `Object.mixin` (deferred from ES6) was designed for:
Besides being shorter to write, `Object.mixin` has the advantages of (1) not creating an intermediate object; (2) taking care of some subtleties, like rebinding `super` for methods, getters and setters if needed.
Therefore, I think that `Object.mixin` is a better function to have than `Object.getOwnPropertyDescriptors`.
More information about the es-discuss