re: OO versus Procedural coding...

I get the feeling that no one who does OO code believes that Procedural
Programmers re-use -any- code at all!

Consider the Tea Machine:

If I had previously programmed a Coffee Machine, I would most likely have
routines (not necessarily coded as a subroutine or a separate program, but
identifiable as "This section of code determines if the user wants cream,"
and "This section dumps cream into the container") that could be re-used as
part of a Tea Machine.

If I had no inkling that I would need both Coffee and Tea machines, I might
not have coded things as subroutines or separate programs.  However, I
would quickly recognize that (1) serving Coffee and Tea are basically the
same activities, and (2) it would be well worth the overhead to smash the
Coffee Machine Program into a number of sub-programs (linkage overhead be
damned!) so that both Coffee and Tea programs would call the same
sub-program for "Add Cream."

It's how I think and code:  "A nifty piece of code is a thing of beauty and
a joy forever."

True, the inheritance is not automatic, and I have to link things together
by hand, but how automatic is linking things in the OO world?  You can
point and click, but you still have to build the initial 'Beverage Machine'
before you can make a 'Tea' or 'Coffee' machine...

--Paul E Musselman

| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "".
| To unsubscribe from this list send email to
| Questions should be directed to the list owner/operator:

This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page