3 ms·
Actually CLOS (Common Lisp Object System) is more dynamic than Ruby. Every CLOS method is part of a generic function. Each generic function is a collection of
by lispm 11y ago
Actually CLOS (Common Lisp Object System) is more dynamic than Ruby.
Every CLOS method is part of a generic function. Each generic function is a collection of methods. At runtime the applicable methods are collected, based on the runtime class graph of the arguments to dispatch over, and an effective method is assembled by a per generic function method combination.
Method selection is also depending on more than one argument (the target object), but on multiple arguments.
Various parts of that are implemented by a meta-object protocol in CLOS implementations, which make it possible to change the behavior of the object system at runtime in various ways.