Guile Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: setf.scm
Chris> But if YOU know that you will never re-define it, then why
Chris> opt for a generic mechanism like setf? Just use
Chris> (set-foo... ) instead. If you don't think things should be
Chris> looked up N times inside some loop, then I guess you don't
Chris> like OO things in general, because it's all about
Chris> dynamically looking up types at run-time.
>What do you mean by generic, here? Perhaps this is my CL experience
>confusing me, but when I hear generic in a Lisp setting I tend to
>think of generic function, and I see no dynamic dispatch here.
If you had a function
(define (inc-age obj) (let (years (age obj)) (setf! (age obj) (+ years
1))))
which can accept any object with an age member, do we need dynamic
dispatch of setf! ?
Guile Home |
Main Index |
Thread Index