[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Generic-methods from multiple modules should merge
From: |
Alan Grover |
Subject: |
Re: Generic-methods from multiple modules should merge |
Date: |
Tue, 10 Jan 2006 20:20:40 -0500 |
User-agent: |
Mozilla Thunderbird 1.0.6 (X11/20050716) |
Yes, lovely section in the NEWS outlining the exact problem, and the
behavior I expect. Though I think that merge-generics should be the
default behavior.
I suppose I'll have to to try to upgrade.
Marius Vollmer wrote:
> Alan Grover <address@hidden> writes:
>
>
>>I think the right thing is to have the module system "merge" the generic
>>methods. Thus, when importing a module, if the module's symbol is bound
>>to a generic-method, and if the symbol is already bound to a
>>generic-method (in the "using" module), add the methods to the existing
>>generic-method. Then, all of the methods are visible under the generic name.
>
>
> You can do this by using a 'duplicates' handler when defining the
> importing module. The 'duplicates' handler determines what is going
> to be done to bindings with the same name. The 'merge-generics'
> handler is probably what you are looking for. See NEWS in CVS HEAD.
>