Can we just have struct inheritence already?
Walter Bright
newshound2 at digitalmars.com
Mon Jun 10 21:15:52 UTC 2019
On 6/10/2019 7:42 AM, Andrei Alexandrescu wrote:
> The same way it causes in C++. Crack open literally any C++ introductory book to
> find the explanation.
Some reasons:
https://stackoverflow.com/questions/4353203/thou-shalt-not-inherit-from-stdvector
https://stackoverflow.com/questions/2034916/is-it-okay-to-inherit-implementation-from-stl-containers-rather-than-delegate
Scott Meyers' "Effective C++ 3rd Edition" points out more failings in "Item 38:
Model 'has-a' or 'is-implemented-in-terms-of' through composition".
More information about the Digitalmars-d
mailing list