guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help required with exporting and using GOOP generics


From: dsmich
Subject: Re: Help required with exporting and using GOOP generics
Date: Thu, 14 Mar 2013 20:11:41 -0400

---- Mark H Weaver <address@hidden> wrote: 
> The proper solution is as follows:
> 
> * Every generic function must be defined (using 'define-generic') and
>   exported from one (and only one) module.
> 
> * Every module that uses a generic function, or adds a method to it (and
>   that includes slot accessors), must first import the generic function
>   from the (one) module that exports it.
> 
> Think of a generic function as a normal procedure that contains an
> internal table of methods.  Like any other procedure, there's a single
> module that defines it and exports it.  The fact that some modules add
> methods to these internal tables does not mean that it is appropriate to
> export the procedure from those other modules.

Thanks Mark.  Very concisely put.

-Dale
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]