Friday, 17 August 2007

Why "Why OO Sucks" Sucks

I just had a strange experience. I read this article and became speechless. I fully respect Joe Armstrong and consider him to be an authority, but I couldn't agree with every_single_statement in his essay. The more I read it, the more suprised I was. Let's take a look at his objections:

  1. Data structure and functions should not be bound together - whaaaat? But don't we think this way? I mean: a dog has it's abilities, there is a distinction of a subject and an object. Armstrongsays that "Functions do things. They have inputs and outputs". He seems to forget that they have also doers and doees (btw: does the former word exist at all?). That really is the way people think.
  2. Everything has to be an object - what's wrong with that? It's quite comfortable to be able to treat anything as a, well, thing, when you need it.
  3. In an OOPL data type definitions are spread out all over the place - wait a minute, don't OOPL's suggest keeping your classes in single files? I guess, what irritates Armstrong are function definitions, which, in his opinion should be kept somewhere else, but that was previous point.
  4. Objects have private state - and that's the reason why threading in OOPLs sucks. True. But we should remember, why private state was introduced: The blessed encapsulation. The bigger part of whole IT business depends on _real_and_unavoidable_ hiding implementation from user. Sadly, not all software is open source(yet, hiaahaha:>).

Until now, everything was fine. I didn't agree with most thesis, but this could have been due to my ignorance. But then, when I got to Why OO was popular section, it was too much. It contains few ad-hoc thesis with no proofs and expects you to agree. And the conspiracy theory looks like some flying spaghetti monster thing. Besides: Armstrong seems not to believe in people (well, developers) too much, he thinks everyone was seduced to use the worse solution. A-a, I don't buy it.

If I should find reasons, why functional languages aren't in spread use today (as spread as OOPLs), I'd say it's because of their poor readability and, therefore, maintainability. Besides, they force you to abstract simply too much.

Even though, I pretty much like functional languages, but more as a mind training, than a candidate to conquer the industry.

P.S. I encourage you to read this post, which contains a much better critical view.

1 comment:

Fuzzyman said...

Interesting post Konrad.