http://www.perlmonks.org?node_id=194838


in reply to Re: Object Orientation is:
in thread Object Orientation is:

I don't want to "evangelize" anything, but I'm not sure why you think OO programming isn't instantaneous. I think how instantaneous it is depends heavily on the language.

C++ looks laborious to me. I haven't learned to code to OO in C++ because I've never had time/need (to even learn C++). Ditto Java. Ditto Python.

Perl OO -- while not instantaneous-- is a great way to learn how OO actually works because all of the internals are exposed. It's almost annoying the way you have to shift $self off the argument list for $self to recognize it-$self, but you really do learn to see an object for just a (blessed) reference to a data structure. I mean, you're there building that structure and manually blessing it. You really get to learn the difference between the namespaces, and how to share data (exporter, etc), and how instance/local variables interact.

Then what about a language like Ruby. How much more instantaneous could a langugage get? It has a interactive mode (irb) where your program runs as you type it. You can define a class in very few keystrokes, redefine classes and methods after you've already started using them (existing objects can learn new behavior), pick up the objects, classes, and shake them and see what falls out. It couldn't get more interactive or instantaneous.

But is OO enough all by itself? Of course not. A good language will have a simple way to write a straight-forward imperative program. It will also have things from functional programming, like the ability to pass a block as an argument or creating closures.

And no, I haven't heard anyone going on about relational databases lately... but I have heard a lot of really enthusiastic discussion of star schema methodology for them. <grin />