lies about OOP

Mike Brenner mikeb at
Tue Jan 4 19:48:47 CET 2005

> ... C++ *appears* to increase the cost of fixing defects ...

Some additional points:

Some languages allow direct pointer manipulation 
which favors certain classes of bugs.
This is independent of whether the language is OO,
and these are probably the most costly defects
to find (hanging pointers, buffer overflows,
array index busting, memory leakages, etc.).

Some languages have strong type checking, which
reduces some classes of bugs.
This is independent of whether the language is OO.

Some people like to think they are OO
if they wrap every incoming piece of data
in get/put methods in classes. This reduces
some categories of errors at the cost of
flexibility. When the input format changes,
the code needs serious modification everywhere.
This is also independent of whether the
language is OO, and is a matter of style.

While python classes permit you to wrap everything,
python classes are so "thin" a wrapper that
it is as if they almost aren't wrapped.

A trend for style would be to use OO for 
the methods on stable objects (a continually
decreasing breed over time) and use
data-driven methods to permit handling
data of very flexible input formats.
This trend will permit more use of 
techniques like XSLT, where data
structures define the transformations
instead of classical code, and 
techniques like semantical analysis
using ontologies, taxonomies, 
thesaurii, dictionaries, and 
mappings of semantics into real-world contexts.

In other words, data-driven software
is not top-down (problem-oriented).
It is also not bottom-up (object-oriented).
It is simply data-oriented, and 
totally driven by the input data.

This trend will result in the number of 
lines of code going down, the cost of
software going down, and the consciousness
of data relationships going up.

We will then see Python-D, the python Data

While Python said: "indentation
of code is everything", Python-D will say:
all the relational arrows in your
dataflow diagram (which IS your code)
must be pointing upwards.

While Python said: "simplify, 
reduce coupling, increase cohesion
of the software, and do tricks with lambda", 
Python-D will say: "simplify, 
reduce coupling, and increase cohesion
of the data, and do tricks with metadata."

Mike Brenner

More information about the Python-list mailing list