Live data from Hacker News

Does OO really match the way we think (1997) [pdf]

leshatton.org

1–10 of 253 posts

Re: Does OO really match the way we think (1997) [pdf]

#5
> Studying the copious literature of OO, the central features which define an OO system seem a little ill-defined.

I didn't know opinion pieces could be disguised as academia. Of course the article has some interesting points about human memory, but that's why we have things like single responsibilities.

Re: Does OO really match the way we think (1997) [pdf]

#6

OOP did more to set back program design than anything else I can think of. It was incredibly wrong, has sent so many smart minds down a poor path. If for example functional has taken prominence in the 90s we'd be in a much better place now.

OO was a huge improvement in the 90s. But as with a lot of paradigms it got elevated to a religion and way overused. I still don't understand why a lot of teaching emphasizes inheritance.

The same would have happened with FP. People would have messed it up too.

Re: Does OO really match the way we think (1997) [pdf]

#7
post #3

C++'s implementation of OO isn't that good to begin with, mainly due to compatibility concerns. Perhaps we should look for a better OO language for comparison, say Smalltalk.

Indeed! And not every language that claims to be OO actually follows the basic ideas [1,2]. So, Smalltalk, as e.g Squeak [3] or Pharo [4] is a good place to start looking and learning but also Erlang [5] and Clojure [6]. State is necessary not "evil" but needs to be managed well. And most OO-languages have, apart from the assignment operation, no abstractions for.

[1] http://wiki.c2.com/?AlanKayOnMessaging [2] http://worrydream.com/EarlyHistoryOfSmalltalk/ [3] http://squeak.org/ [4] https://pharo.org/ [5] http://www.infoq.com/interviews/johnson-armstrong-oop [6] http://thinkrelevance.com/blog/2013/11/07/when-should-you-us...

Re: Does OO really match the way we think (1997) [pdf]

#8
post #3

C++'s implementation of OO isn't that good to begin with, mainly due to compatibility concerns. Perhaps we should look for a better OO language for comparison, say Smalltalk.

Ya. Lots of people think OO equals C++ and Java, but that is like evaluating FP on the basis of Haskell alone.

Re: Does OO really match the way we think (1997) [pdf]

#9
Prototype based inheritance (e.g. JavaScript, Lua) is a much better concept. (It's much more powerful and allows you even to implement class based inheritance.)

Also functional programming has its benefits.

The 1990s/2000s with the OO hype around C++/Java/C# was a set back.

Re: Does OO really match the way we think (1997) [pdf]

#10
post #3

C++'s implementation of OO isn't that good to begin with, mainly due to compatibility concerns. Perhaps we should look for a better OO language for comparison, say Smalltalk.

Ya. Lots of people think OO equals C++ and Java, but that is like evaluating FP on the basis of Haskell alone.

Agree that Java and C++ are poor examples. However, OOP fundamentally results in a combinatorial explosion of state, which makes programs difficult to reason about. This can be useful in some niche applications but does not make a good general approach. The best part of OOP is arguably its support for first-class modules, but this feature could in theory be added to a functional language.

EDIT: the reason why there is an explosion of state is because every object in OOP is potentially stateful. If I build a composite object Z from objects X and Y, the set of possible states Z has is a product of the set of possible states X and Y have.

Post reply on HN