if classof( object)
do_this();
else
do_that();
end;
if classof( object).has_method( X ) ....
####
if( classIsClosed ) {
lookup the address of the code in this class, fix up the parameters and invoke it.
}
else {
Perform a full search of the inheritance heterarchy to locate the (appropriate) method provider (possibly with conflict arbitration).
Fix up the parameters, (with possible further class and method resolution cycles.
Invoke the code.
}
####
:canonical # canonical dispatch order
:ascendant # most-derived first, like destruction order
:descendant # least-derived first, like construction order
:preorder # like Perl 5 dispatch
:breadth # like multimethod dispatch
and some that specify selection criteria:
:super # only immediate parent classes
:method(Str) # only classes containing method declaration
:omit(Selector) # only classes that don't match selector
:include(Selector) # only classes that match selector