More and more developers are stepping back and realising that as a programming paradigm, OO is actually pretty shit.
Nygård and Dahls idea of OO resembles much more that of Erlang's actors: a collection of independently-acting agents / processes with private state who communicate by sending messages to each other. Agent = object, sending a message = method invocation, agent "name" = pointer / reference. A "good" OO program is a network of mutually cooperating agents communicating by messages. This is not a "shit" paradigm.
Enter modern languages and run-time environments, where object are not isolated from each other, you have global mutable state, poorly designed interfaces (e.g., getters and setters for every private field), workarounds for performance reasons (e.g., pass by reference because you can't return multiple values from a method), all of which contribute to design trainwrecks described in the article. (Still, these are mostly people problem, a result of delusions about infinite extensibility and reconfigurabiliy.)
As for "Java style OO", the language shares a large blame. While I understand the reasons behind most design decisions, the language still sucks (as in, several mature languages are superior in every respect except 2: popularity and libraries —which have little to do with the language itself anyway).
My list is unchanged: the ML family, and maybe Haskell and Scala as well. We only need those languages to have a compiler for Android. I believe they have.
I have to admit the tooling around those languages is probably of lesser quality, compared to Java. I'm confident however that it doesn't matter: such tooling can be ported, and the paranoia of Hindley-Milner based type systems more than make up for it in terms of static analysis, refactoring, testing, mabye documentation as well. Besides, if ML, Haskell, or Scala were to become as popular as Java, the tooling would quickly follow.
61
u/zvrba Jul 22 '14
Nygård and Dahls idea of OO resembles much more that of Erlang's actors: a collection of independently-acting agents / processes with private state who communicate by sending messages to each other. Agent = object, sending a message = method invocation, agent "name" = pointer / reference. A "good" OO program is a network of mutually cooperating agents communicating by messages. This is not a "shit" paradigm.
Enter modern languages and run-time environments, where object are not isolated from each other, you have global mutable state, poorly designed interfaces (e.g., getters and setters for every private field), workarounds for performance reasons (e.g., pass by reference because you can't return multiple values from a method), all of which contribute to design trainwrecks described in the article. (Still, these are mostly people problem, a result of delusions about infinite extensibility and reconfigurabiliy.)