Hello, Why does Object.assign ignore inherited enumerable properties? What is the problem to which ignoring inherited properties is the solution to?
All I can see is that it prevents a useful use of inheritance. The Liskov substitution principle was mentioned 27 years ago in ’87. Why is Object.assign breaking it? - Everyone who’s messing with Object.prototype has to do it an non-enumerable style anyway. - Most uses of Object.assign will likely be for objects with a finite number of keys. Those form specific and implicit types from which people are likely to read with the dot-operator. That takes inheritance into account anyway. I don’t get the agenda to mess with object inheritance. If one wants methods to only be in the parent and data on the child (so Object.assign would only copy data), use a classical language. In a delegation-prototypal language one should be able to inherit freely because of LSP. Andri
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

