![]() |
![]() |
![]() |
![]() |
![]() |
|
In the vernacular of Smalltalk programming, messages are sent to receivers, and receivers return answers. To do the necessary computation, Smalltalk finds the appropriate method, given the receiver and the message, and that method specifies exactly how the computation is to be performed.
For example, Smalltalk allows you to send a message, sqrt, to
a receiver, 2, which is a member of the Integer class. To handle the
message, Smalltalk finds the appropriate way to compute the required
square root for receivers belonging to the Integer class; then,
Smalltalk produces the answer, 1.41421, which is an instance of
the Float class.