This is the mail archive of the guile@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: setf.scm


> In the Goops-free Guile, (set! (G A1 ...) V) will be expanded to
> ((setter P) V A1 ...).  What I'm saying is that if the
> getter-with-setter pair is stored in the procedure slot of the method,
> P needs to be calculated from G by dispatch on A1 ...

My understanding of CLOS-like systems is that a generic function is
a real object.  In that case, the setter would also be a generic function.
Alternatively, a getter-with-setter pair is an object containing
*two* generic functions.  To add a new method to the getter, do plain:
	(define-method X (...) ...)
to add a new method to the setter, do:
	(define-method (setter X) (RHS ...) ...)

This is of course hand-waving, since the specifics depend on the actual
object system used.

	--Per Bothner
Cygnus Solutions     bothner@cygnus.com     http://www.cygnus.com/~bothner