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 (!)


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)

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