In Common Lisp, replacing "get-setf-method" with "get-setf-expansion" is not always working
The sortf function from Chapter 12 of the book "On Lisp" originally used get-setf-method, which is currently unavailable in a recent SBCL by default. Therefore, get-setf-expansion was used instead of get-setf-method in a modified version of sortf. However, the modified sortf does not work, because get-setf-expansion returns the same symbol with the fixed name #:NEW1 rather than a symbol created from gensym. The problem of the same symbol name results in different macro expansions between two versions of sortf. For example, when executing (macroexpand-1 '(sortf > x (aref ar (incf i)) (car lst))
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.