Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!ucsd!ames!ai.etl.army.mil!hoey From: hoey@ai.etl.army.mil (Dan Hoey) Newsgroups: comp.lang.lisp Subject: Re: Amusing Code Message-ID: <179@ai.etl.army.mil> Date: 24 Aug 88 15:01:34 GMT References: <389@soi.UUCP> Reply-To: hoey@ai.etl.army.mil (Dan Hoey) Organization: Naval Research Lab, Washington, DC Lines: 19 In article <389@soi.UUCP> alex@soi.UUCP (Alex Zatsman) writes about modifying quoted structure, as in >(defun Init-Stack () (setf *Stack* '((:Bottom-Frame)))) >(defun Push-Object (Object) (push Object (car *Stack*))) where calling PUSH-OBJECT can modify the quoted constant in INIT-STACK. The current feeling of a lot of the Common Lisp developers is that such behavior is an error. In particular, if an implementation has the capability of supporting read-only storage, then it may use that storage for quoted structure, and calling PUSH-OBJECT may signal an error. A better way of writing INIT-STACK is (defun Init-Stack () (setf *Stack* (list '(:Bottom-Frame)))) Dan