[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



     (macroexpand-1 '(setf (ldb 1404 (arraycall fixnum foo-array 0))
			   (+ 3 4)))

     (PROGN ((LAMBDA (G0026 G0027) (STORE (ARRAYCALL FIXNUM G0026 0) G0027))
	     FOO-ARRAY
	     (DPB (+ 3 4) 1404 (ARRAYCALL FIXNUM FOO-ARRAY 0)))
	    (+ 3 4)) 

is correct, but

     (macroexpand-1 '(setf (ldb 1404 (arraycall fixnum foo-array 0))
			   (+ 3 (length '(4))))) 

     ((LAMBDA (G0030 G0031)
	(SETQ G0030 (DPB G0031 1404 G0030))
	G0031)
      (ARRAYCALL FIXNUM FOO-ARRAY 0)
      (+ 3 (LENGTH (QUOTE (4))))) 

is confusing to say the least. Does it not bash the new value
back into the array because SETF cannot determine if it is a
constant thing? I thought
	(setf (foo-reference) <value>)
was supposed to allow you to do (foo-reference) and get back
what <value> was at the time.  I know that (foo-reference) and
<value> might be different if I computed <value> again, but does
that mean I must lose my first computation by trying to use SETF,
which in turn tries to out-smart me?