Calling less-specific methods
Factor handbook » The language » Objects » Generic words and methods

Prev:Method precedence
Next:Custom method combination

If a generic word is called with an object and multiple methods specialize on classes that this object is an instance of, usually the most specific method is called (Method precedence).

Less-specific methods can be called directly:

A lower-level word which the above expands into:
(call-next-method) ( method -- )

To look up the next applicable method reflectively:
next-method ( class generic -- method/f )

Errors thrown by improper calls to call-next-method:
inconsistent-next-method ( class generic -- * )

no-next-method ( method -- * )