
23 Aug
2009
23 Aug
'09
1:45 a.m.
Nicholas Howe wrote:
On Sat, Aug 22, 2009 at 3:35 PM, Robert Ramey <ramey@rrsd.com> wrote:
How would this differ from the signals/slots library?
The difference is that when invoked, a multimethod selects a single best registered method implementation based on the dynamic types of its parameters, whereas signal calls all of its registered methods, which accept parameters of the same type.
What is a practical use for multi-methods ? Why would I register similar methods with a multi-method implementation and then let the implementation choose a "best registered method" when I invode a method through the multi-method implementation ?