A story about Python... sort of

Russell Reagan rreagan at attbi.com
Fri Jul 4 01:39:21 CEST 2003

"F. GEIGER" <fgeiger at datec.at> wrote

> [OT] That's not a pro, that's a con on the C++ side. And actually that's
> reason why there's so much bad C++ software. A C programmer first has to
> forget C to be able to program in C++ - well, to be able to program OO in
> C++.

C++ is not an OO language. It is a multi-paradigm language that happens to
support OO features. No one is required to program OO in C++. It's even very
debatable if it's better to program OO in C++. OOP is just another tool, and
in a lot of cases, objects don't make sense for a particular problem (I
can't count the number of times I've tried to cram something into an OO
system). There is nothing wrong with using C++ as a "better C", taking
advantage of type safety, safer "macros" (inline functions), and it doesn't
require any OO knowledge to be able to understand the concept of
encapsulation within a class (you can do the same encapsulation in C
programs, and any good C programmer would do this anyway).

Personally, I prefer to pick some from both C and C++. I use classes and use
an object oriented structure to my programs, but I generally don't get into
inheritance, virtual anything, templates, etc. (there are exceptions of
course). Mainly I enjoy the compiler enforced restrictions on data and
functions that the class mechanism supplies.

More information about the Python-list mailing list