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] |
In earlier discussions on this topic, we talked about a generalized set! form. Now, suddenly everyone is talking about setf!. Why this sudden poorly-motivated name-change? Common Lisp provides setf as a generalization of setq. Well, we can use setf! as a generalizion of set!, but it makes a lot more sense to me to use set! as a generalization of set!. * Using (setf! (...) ...) instead of (set! (...) ...) adds a needless top-level name, adds conceptual clutter, and is likely to lead to more silly mistakes (as people use one where they should have used the other). * If we provide a "paren-reduced" surface syntax for Scheme (as I intend to do), it is much simpler if we can just say that: LHS := RHS is translated into: (set! LHS RGS) * Generalized set! is what I have implemented in Kawa, and I am not going to rename it. As a reminder of previous discussions: (set! (PROC ARGS ...) RHS) is (in Kawa at least) equivalent to: ((setter PROC) RHS ARGS ...) (The RHS becomes the first arguemnt to the setter because of the need to support var-args functions.) P.S. Sorry Jim. I did it again ... --Per Bothner Cygnus Solutions bothner@cygnus.com http://www.cygnus.com/~bothner