Search This Blog

Monday, July 23, 2012

We don't need no Ooooo-Orientation – 2

Philosophical Underpinnings of OO

In the case of OO, we find a good deal of…
No philosophy
We don't need no philosophy (we are techies!) 1
Naive philosophy
Isn't it obvious what an object is? Just a(ny) thing? 2
Bad science
The most important concepts in CS eg. program correctness, are uncomputable.  There is therefore a strong limit on what can be modeled in a programming language.  This is usually non-understood by those who think that by having a magic word class any and every concept can be modeled
Faulty technology
Anyone heard of a language called C++?
Level mixup
This one is a bit hard to explain – one moment an OO aficionado is talking technology, one moment science, one moment philosophy

Peter Wegner, comes from the OO camp. Yet unlike most others from there, he actually thinks through philosophical issues.  An important contribution of his is his succinct philosophical underpinnings of those drawn to and repelled from OO. Briefly OOers are empiricists, the others (functional and logic programmers ie those drawn to declarative approaches) are rationalists. This divergence is 2000 years old – Plato vs Aristotle – and OO by adding more jargon than understanding adds to rather than reducing the mess.

And here's Paul Graham with a view from the other side. Quoting Rees who shows that OO and inheritance means too many things to too many people to be seriously taken to be meaningful.  Here  and here are the original discussions.

Summarizing his point: The following 9 items are taken to define OO
  1. Encapsulation
  2. Protection
  3. Ad hoc polymorphism
  4. Parametric polymorphism
  5. Everything is an object
  6. All you can do is send a message (AYCDISAM) = Actors model
  7. Specification inheritance = subtyping
  8. Implementation inheritance/reuse
  9. Sum-of-product-of-function pattern
However different OO aficionados take different subsets and so the concept as a whole is ill-defined.

Footnotes
[1] C.E.M. Joad once said that people who think they haven't got a philosophy simply have a badly-thought-out one.
[2] See Johnson's kick

No comments:

Post a Comment