Latest revision as of 03:46, 7 August 2011
__respondsTo/2 is a Miranda message for asking whether an object understands a message.
Returns a boolean indicating whether this object responds to messages with the verb verb and arity (number of arguments) arity.
The Miranda method for E-language objects is:
- If this object has a method with the given verb and arity, return true.
- If there is a Miranda method with the given verb and arity, return true.
- If the object has a matcher, return the result of invoking the matcher with the __respondsTo message. If the matcher does not match, return false.
- Return false.
XXX confirm this is an accurate description of current behavior.