On Sat, Mar 22, 2008 at 12:22:55AM -0700, [EMAIL PROTECTED] wrote:

IMHO the essense of OOP is organizing related functions and data into
distinct units.  We call these data-function blobs "objects".

Actually, that almost entirely misses the point of OOP.  I would call that
more something like modular programming or structured programming.

There are several aspects that are important to OOP, all of which can be
done independently, but people tend to bundle them together and call it
OOP:

  - organization, as you have mentioned.

  - data or structure inheritance.  Allowing subtypes that contain the
    fields of parent types with possible additional fields added.

  - Dynamic dispatch.  Probably the most important part.  Allows calls to
be generalized
I'm not sure calling it "message oriented programming" emphasizes
this idea of data-function blobs.

Why is why some consider it a better term.  The emphases is on what is done
not on the blobs of data.  A properly organized class system (at least
according to this methodology) won't be though of as a bunch of data, but
as a bunch of abstract entities (objects) that can be sent messages.

There is a complete equivalence between message passing and generic
procedure dispatch (at least of the first argument).  Generic procedures
that dispatch on the types of multiple arguments are more general than
message passing, although there will always be ways of doing the same
thing.

It can be argued that languages that focus on the fields of classes
distract away from the methods.

David

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to