Re: OOP can be simply summed up as 'passing messages to objects'



Alfredo Novoa wrote:

Phlip ha escrito:

OOP is passing messages to objects, where each responds to a message with a
method.

Passing messages to objects is simply a fashionable synonym of:
invoking procedures.

Correct.

But in the OO world it's up to the destination object to select
the appropriate method to be executed (subtype polymorphism
+ dynamic binding), which justifies this elegant (Smalltalk's)
message terminology.

BTW, this OO characteristic makes it very distinct from
traditional procedural languages (in which the caller - and
not the callee - selects the routine to be executed).

Regards
Alfredo

Best regards,

-miguel

--
Miguel Oliveira e Silva

.



Relevant Pages