This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Trouble understanding define (!)


Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:

> 3. We let `define-generic' and `define-method' query the module
>    system for the current value of all definitions of the name being
>    defined in all modules on the use list.  If it turns out that the
>    name being defined is exported from and is a <generic> in one or
>    more used modules, we create a new <extended-generic> with
>    `generic-functions' bound to a list of those functions.

Actually, as we've noted before, this has to be handled entirely by
the module system.  This is because we want to "merge" generics into
extended-generics also for generic functions that aren't extended by
the module but simply used.

But I think the <extended-generic> is the kind of solution we've been
waiting for.  Although this special treatment given to generic
functions by the module system will certainly be the most ugly aspect
of GOOPS, letting <extended-generic>s refer to generics instead of
copying their methods makes it more reasonable.

In any case, merging generics like this is probably the least
confusing and most practical solution.  I'll implement a prototypical
solution soon which we can test.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]