This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Trouble understanding define (!)
- To: Neil Jerram <neil at ossau dot uklinux dot net>
- Subject: Re: Trouble understanding define (!)
- From: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Date: 19 Jan 2000 00:12:00 +0100
- Cc: jostobfe at calvados dot zrz dot TU-Berlin dot DE, guile at sourceware dot cygnus dot com
- Cc: djurfeldt at nada dot kth dot se
- References: <200001142054.UAA00622@ossau> <p2tzou4o5ov.fsf@pampelmuse.zrz.tu-berlin.de> <200001182250.WAA00624@ossau>
Neil Jerram <neil@ossau.uklinux.net> writes:
> Now I just want to work out what these answers imply for the behaviour
> of define-generic and define-method in GOOPS.
I actually don't think these issues are connected.
`define-method' simply expands to
(add-method! NAME (method ...))
All references to free bindings, NAME and other references in the
method formals and body, are equivalent to ordinary free references.
`define-generic' currently has a `defined?' in its expansion, but I
will remove that soon. It should expand to
(define NAME (make-generic ...))
which also can be interpreted independent of the module system.
I think the only questions where it is a bit unclear what the final
solution should look like is
* class redefinition using `define-class'
* importing generics from another module (should one binding of a
generic shadow another with the same name, or should the module
system create a new generic function, containing a union of the
methods; I actually begin to favor the latter alternative)