[15]> (macroexpand '(setf (car x) y))
(SYSTEM::%RPLACA X Y) ;
T
So far so good. But:
[16]> (macroexpand '(setf (aref x y) z))
(LET* ((#:G1267 X) (#:G1268 Y) (#:G1269 Z))
(SYSTEM::STORE #:G1267 #:G1268 #:G1269)) ;
T
[17]> (macroexpand '(setf (gethash x y) z))
(LET* ((#:G1270 X) (#:G1271 Y) (#:G1272 Z))
(SYSTEM::PUTHASH #:G1270 #:G1271 #:G1272)) ;
T
[19]> (macroexpand '(setf (seventh x) y))
(LET* ((#:G1275 X) (#:G1276 Y))
(SYSTEM::%RPLACA (CDDR (CDDDDR #:G1275)) #:G1276)) ;
T
What? Why not simply:
(SYSTEM::STORE X Y Z)
(SYSTEM::PUTHASH X Y Z)
(SYSTEM::RPLACA (CDDR (CDDDDR X)) Y)
There are no variable capture issues, nor multiple evaluations
of the parameters.
Are not the parameters to SYSTEM::STORE and others evaluated
left to right? Even if that was the reason, there is no reason to use let*
to bind the gensyms, because let* merely ensures an order of establishment
of the *bindings*. With plain let, evaluation is still left to right,
but the bindings to the symbols are established in parallel. Since the
initializing expressions cannot refer to the gensyms, let* is
unnecessary.
Am I missing something, or should I make a patch? ;)
Or would it be faster to make a patch anyway and later be told I'm
missing something? ;)