Implementing Message Sending

The first argument of sendm must be an object whose class can be determined; otherwise, it is an error.

Once the class of the object has been found, it is necessary to find the method that corresponds to the selector of the message.[In CLOS, the method can depend on the types of all the arguments, not just the first argument.] This requires a search of the class of the object, and perhaps its superclasses, until the desired method is found.

Once the method has been found, the method function is called, using as arguments both the object to which the message was sent and any args supplied with the message.

Contents    Page-10    Prev    Next    Page+10    Index