lies about OOP

Martijn Faassen faassen at
Wed Dec 15 01:24:43 CET 2004

beliavsky at wrote:
> A paper finding that OOP can lead to more buggy software is at
[snip description of paper that compares C++ versus Pascal or C]
> What papers have scientific evidence for OOP?

That's of course a good question. I'm sure also that comp.object has 
argued about this a thousand times. I'll just note that one paper is 
just a single data point with specific circumstances. The OO languages 
under investigation might have caused increased or lower failure rates 
for other reasons than their (lack of) object-orientedness, for 
instance. It is of course possible to come up with a lot of other 
explanations for a single data point besides a conclusion that OOP can 
lead to more buggy software. It for instance certainly not surprising to 
me that C++ can lead to more buggy software than some other languages. :)

> If OOP is so beneficial for large projects, why are the Linux kernel,
> the interpreters for Perl and Python, and most compilers I know written
> in C rather than C++?

Because C++ is not an ideal object oriented language? Because a Linux 
kernel has very stringent predictability requirements for what kind of 
machine code is generated that C meets and is much harder to do with 
C++? There are other reasons to choose C, such as portability, obiquity 
and performance.

Some of the same reasons probably apply to Perl and Python, though at a 
lesser degrees. I do not know a lot about Perl's implementation. I do 
know that Guido van Rossum has in fact considered rewriting Python in 
C++ in the past. And right now, there are various projects that are 
using object oriented languages to reimplement Python, including Python 

Finally, it is certainly possible to program in object oriented style in 
C. It is more cumbersome than in a language that supports it natively, 
but it is certainly possible. Such OO in C patterns occur throughout the 
Linux kernel, which needs a pluggability architecture for its various 
types of drivers. It can also be seen in many aspects of Python's 
implementation. Another example of a C-based system that uses object 
oriented technologies is the GTK+ widget set.

Anyway, this question is using a few data points to make an overly 
generic argument, and the data points themselves do not really support 
the argument so very well either.



More information about the Python-list mailing list