skipping __init__ and using exploiting a class member instead

Roy Smith roy at panix.com
Sun Oct 20 16:44:33 EDT 2013


In article <0e9b51a9-bd78-4d34-b277-c463347e8e02 at googlegroups.com>,
 Peter Cacioppi <peter.cacioppi at gmail.com> wrote:

> >  You certainly don't have to write a constructor for a subclass in C++. 
> 
> Ahh, this message board is so collectively well informed (once you get past 
> the trolls)
> 
> The C++ project I worked on was religious about always overwriting parent 
> class constructors. I had assumed this was because the language proper forbid 
> it, but apparently it was just project protocol. 

One of the problems with C++ is that it's such a huge language, nobody 
knows all of it.  Most people learn some subset of the language that 
they get comfortable with (often because that's the subset that's used 
on the project they're working on).  Then it's easy to assume that the 
part you know is all there is to know.

Personally, I barely know the STL (because the various C++ projects I've 
worked on all predated the STL and rolled their own container classes).  
Likewise for most of the std streams library.



More information about the Python-list mailing list