> Le 5 mars 2014 à 00:18, Andrea Giammarchi <[email protected]> a 
> écrit :
> 
> 
> Also please note that this proposal simplifies [Object.assign(target, 
> source)](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
>  too since latter one is basically:
> 
> ```javascript
> Object.defineProperties(
>   target,
>   Object.getOwnPropertyDescriptors(source)
> );
> ```

No. `Object.assign` (1) uses the semantics of the assignment operator `=` (for 
example, it makes a difference in case of setters), and (2) copies only 
enumerable properties. Did you think about `Object.mixin`?

—Claude
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to