Article View: comp.std.c++
Article #2902Re: Protected Inheritance: ?
From: Steve Clamage
Date: Thu, 07 Dec 1995 18:37
Date: Thu, 07 Dec 1995 18:37
33 lines
1605 bytes
1605 bytes
In article c95@steel.interlog.com, herbs@interlog.com (Herb Sutter) writes: > >"What is protected inheritance?" >Through experience, I now know the answer. However, by far the most common >(and wrong) idea I keep hearing is that it was 'put in for completeness' since >we already have public and private inheritance, but that no one really knows >what it's good for. The only reason for protected inheritance I ever saw or heard was for symmetry and because there seemed to be no reason to disallow it. >... In >contrast, I've recently come upon two detailed examples in my own work where >it is both necessary and elegant. ... >If the above literature really reflects the state of the industry, I should >write a few articles. Please do. I always find it a bit embarassing when teaching C++ to describe protected inheritance as a solution in search of a problem. --- Steve Clamage, stephen.clamage@eng.sun.com --- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<4a78gh$itd@engnews1.eng.sun.com>Path:
arc1-ca.pugleaf.net!howland.reston.ans.net!agate!agate!MattReferences:
<4a4hh6$c95@steel.interlog.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!howland.reston.ans.net!agate!agate!Matt From: clamage@Eng.Sun.COM (Steve Clamage) Newsgroups: comp.std.c++ Subject: Re: Protected Inheritance: ? Date: 07 Dec 1995 18:37:35 GMT Organization: Sun Microsystems Inc. Approved: Matt@Austern Message-ID: <4a78gh$itd@engnews1.eng.sun.com> References: <4a4hh6$c95@steel.interlog.com> Reply-To: clamage@Eng.Sun.COM NNTP-Posting-Host: austern.hip.berkeley.edu