RFC: one point more

Wittenberger (jw@ibch50.inf.tu-dresden.de)
15 Jul 1994 11:12:32 +0200

Damned, now I know what kind of environment you need for *any*
writing. SILENCE and less than 5 desks in a room.

I forgot to mention one point in my posting. I would better go as
point 5 but now it's 6:

6) Not all programming can be done as OO if it should be done in the
best structure for the human reader.

(Don't reply you program to be read by a machine. Then you should
program assembler or even better encode the bits by hand!)

There are 2 things related:
a) For imagination: Terms like function, procedure, relation are not
invented for the need of computers, they are adopted from natural and
scientific language.

b) To define functions (most of them) and relations there is a typical
way:

You assume 2 or more objects, combine them in a syntactical way and
now you define for this aggregation at least one more object,
computable from the objects started from.

The computation doesn't belong to any of the objects started from.
It belongs to the aggregation, to a syntactical production.

If it would belong to one of the objects started from, this object had
to know something about it's context -- bad OOP.
If it would belong to the resulting object, than lets think about the
eql-relation. The result is boolean. Now boolean had to know about all
the comparable objects. Hot air.

But the OO-paradigm requests the computation to be a method of one of
the objects. That is, where OO fails to serve what it should do.
OO realy needs a extention "back" to syntax-oriented programming and
anywhere else.

Here are some points which come from this lack of OO-paradigm:

Most OO-Languages still have operators. There usage hides this bad
construction.

The method-definition for operators are very fancy.
(If there is somthing like "a+b": belongs the method called to
a or b? Ok, the language defines that. But which reason gives
the decision?)

Python gets flooded these day with magic __*__ functions for this
reason.

C++ (which doesn't force you to program good OO but gives you the
chance) carries mechanisms to break the OO-paradigm. Have a look in
the iostream-library. The "<<" operator for example is heavily use and
overloaded. But it's definition isn't a method.

--

----------------------------------------------------------------------------- Joerg Wittenberger Rietzstr. 32b 01139 Dresden Germany

email: jw@ibch50.inf.tu-dresden.de jw6@mail.inf.tu-dresden.de

WWW: <a href=http://www.inf.tu-dresden.de:8002/people/jw6/top.html>jerry</a>

PGP PUBLIC KEY: available on request or by finger