2008/9/24 Clinton Ebadi <[EMAIL PROTECTED]>: > This is a bit of an open problem even if the other languages. You can > specify a collective interface in Java (or a mixin class in C++), but > you still cannot specify the required behavior of the protocol except > in an ad hoc fashion. This is a problem that may never be solved (and > is perhaps a sign that OO is not so great).
There are certainly many other problems with the OO paradigm. I have coded in Java, and one of its greatest failings is that it *forces* you to associate every function to some object -- It forces you into designing interfaces even when you are only interested in implementation. This is not a problem for some 90% of all the functions one typically ahs to create in some project. However, during architecture, design, development, there's always a few "tricky" areas, where its simply not clear where to implement some function -- there may be several choices, all not very good, etc. However, Java *forces* you to stick such functions into a class, some class, any class, even if they don't really belong there. And once you do that, the next thing you know, they are so tightly tied in, that it becomes impossible (well, overwhelmingly difficult) to refactor the code. This is a variant of the so-called "quick-setting concrete" effect seen in C++. In real life, design needs to be more flexible, more moldable, and code needs to be easy to change. Many object systems seem to make a point of inhibiting design change, by forcing you design (and use) an interface before you are intellectually ready to design the interface. --linas