When life gives you lemons

...make lemonade

Many, many issues ST

This article raises many issues.

First and foremost is the square peg in the round hole thing. Making a package "object-oriented" just for the sake of it is obviously a counterproductive management decision. A close second is the buzzword versus the ding an sich. It seems apparent to me that the management had no clear understanding of what they meant by "object-oriented." This leads to an auxiliary problem: what is "object-oriented?"

Alan Kay once said something like "I coined the term 'object-oriented,' and C++ wasn't what I had in mind." Even this, though, conflates the problem. There are object-oriented design and implementation techniques. There are also languages that are intended to facilitate these techniques. They are not the same.

One can do nicely object-oriented design in a completely procedural language. It may not be convenient, but it can be done. Similarly, one can do procedural programming in an object language

The original philosophy of object-oriented programming, popular amongst Smalltalk programmers, has not made it over to C++. This is for a variety of reasons. One is re-implementation of legacy code. Another is that C++ imposes some costs on dynamism. It's still possible to write decent O-O code in C++; it just isn't very common. Java has fared somewhat better, but not much.

Instead, what happens usually in C++ is what I call "class-oriented programming." Classes become like robots or glorified modules.

The example I usually use is the one used by a lot of textbooks. If one is to write a bank account, the C++ way is to have a BankAccount with member functions like deposit(float amount). The Smalltalkey/original O-O way would be to have objects that represent money (100 dollars or 90 euros, say) and have them controlled by transaction objects that only then interact with account objects.

Which is better I'm not going to argue here. Both have their place, as do functional programming, procedural programming, etc. But although it is certainly possible for the same person to understand both ways of doing things, throwing together a bunch of Smalltalk gurus and C++ people is just a recipe for disaster.

Humans are at least as numerous as pigeons, their brains are not significantly costlier than pigeon brains, and for many tasks they are actually superior.-