Subject: Re: SETF : Ambiguous?
From: Erik Naggum <erik@naggum.net>
Date: Thu, 22 Nov 2001 15:21:16 GMT
Newsgroups: comp.lang.lisp
Message-ID: <3215431275217808@naggum.net>

* Rene_de_Visser@hotmail.com (Rene)
| However I didn't see where the order of place and new value was defined in
| the Hyperspec for SETF.

  There is nothing special about the evaluation order for setf.  The
  standard Common Lisp evaluation order is strictly left to right.  Any
  deviation from this is a serious bug.

(let ((x (list 1 2 3)))
  (setf (cdr (progn (format t "First base!~&")
                    x))
        (progn (format t "Second base!~&")
               (list 3 5)))
  x)

  In a conforming Common Lisp implementation, this _must_ print First base!
  and Second base! in that order and return (1 3 5).

///
-- 
  Norway is now run by a priest from the fundamentalist Christian People's
  Party, the fifth largest party representing one eighth of the electorate.
-- 
  Carrying a Swiss Army pocket knife in Oslo, Norway, is a criminal offense.