[Tutor] Whats so good about OOP ?

Sean Perry shaleh at speakeasy.net
Sun Mar 13 08:57:50 CET 2005

Mark Kels wrote:
> Hi list !
> I want to know whats so great in OOP...
> I have learned some of it, but I don't understand why everybody like
> it so much...
> Can anyone give me an example for a task that could be done only with
> OOP or will be much simpler to do with it ?
> Thanks in advance.

Other commenters on this thread have covered OO fairly well. I have one 
clarification detail to add.

In procedural code, you spend a lot of time micromanaging:

put that there
blah + quz is bar

In OO code, you tell each object how to handle its data. Then your 
actual program just becomes a bunch of requests for objects to talk to 
each other. I know, you are thinking that is how your procedural code 
works today. But as you program, look at how much time you are telling 
the pieces what their jobs are and how much time you spend telling 
pieces to do their jobs.

For further knowledge, read the Design Patterns book. It will seem like 
obvious, simple ideas you already know. It did for me. It is not until 
you start talking to other people that you realize what you learned. I 
am currently reading Holub's "On Patterns". He hammers OO ideas home 
pretty well.

As Alan Gauld said, OO does not really start to shine until you reach a 
certain level of complexity. It takes most people quite a while to 
really get into the mindset. Take it slow, get it wrong, do it again (-: 
We all have.

More information about the Tutor mailing list