[Xotcl] XOTcl method call precedence order

Neil Madden nem at Cs.Nott.AC.UK
Thu Oct 5 19:01:36 CEST 2006


Hi Gustaf et al.,

I have a quick query regarding the precise method call order used in  
XOTcl. The basic concepts involved seem to be filters, mixins, object  
methods and inheritance. If I understand things correctly, these  
apply in the following order:

     filters -> mixins -> instance methods -> "unknown"

and for each of the first three, lookup is done using the inheritance  
hierarchy, i.e.:

     object -> class -> [superclass -> ...]

So, e.g. a per-object filter happens before a class-filter, but a  
class-filter still happens before a per-object mixin. "instance  
method" refers to procs when we are examining the actual object  
instance, and "instprocs" when we are searching its class/superclasses.

Is this description correct? The only two mechanisms that I don't  
know where to put are assertions and forwarders. Are these  
implemented using e.g. mixins? Or are they a special-purpose  
mechanism? If so, where do they come in the order?

Cheers,

-- Neil


More information about the Xotcl mailing list