"There ain't no good guy
There ain't no bad guy
There's only you and me and
We just disagree"
-- Dave Mason
I don't like Object Oriented programming.
There. I said it. Can't stand it. Give me procedural code any day.
There's a lot of hubbub in Perl circles about Ruby. There's a lot of hubbub everywhere about Java.
Well, OO is where it's at.
So they say. Oh, sure, there's a lot of things that are often packaged with OO that I like. Method and operator overloading. Inheritence. Data encapsulation. (Although not strict encapsulation. It's painful to see so many programmers jumping through hoops to get around one of the very features they often tout.)
As a matter of fact, there's really only one thing that kills OO for me.
That you can't program in it?
Very funny. No. The syntax.
When I'm programming, I'm giving commands! Read in a string! Chop off the newline! Print that string out! None of this, "String, be read", "String, be chomped", or "String, be printed." (Or is that "Input, be read into the string", "Newline, be removed from the string", and "Output, be receptive to the contents given by string."?
A lot of people like the syntax. It's so clean. It's so pure.
@#$!
Look down inside that object code. What do you see? Yep, good old procedural stuff. When it comes down to nuts and bolts, it's still action-centric.
Not if it's done right.
Where everything's an object? Oh, come on. You don't actually believe that, do you? Do you normally communicate that way? Do you normally think that way? "I, these two numbers, will add." Of course not. That's why you still see the very "procedurish" 'a = b + c' in OO code.
Except that '+' is probably an overloaded method of one of the classes.
I said I like overloading. But tell me this:
Oh, wait. There is.
Perl.
Indirect object syntax.
Which no one likes.
Except, apparently, for me.