Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!aplcen!samsung!think!ames!dftsrv!mimsy!tove.umd.edu!folta From: folta@tove.umd.edu (Wayne Folta) Newsgroups: comp.lang.lisp Subject: Are "destructive" functions really destructive? Message-ID: <20991@mimsy.umd.edu> Date: 29 Nov 89 09:06:26 GMT Sender: news@mimsy.umd.edu Reply-To: folta@tove.umd.edu (Wayne Folta) Distribution: usa Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 20 I take it from the Common LISP Reference that functions marked "(destructive)" are destructive in the sense that they *may be* destructive in some way. Is it thus true that I cannot count on destructive behavior when I want it? For example, if I want to delete something from a large datastructure, I assume that I would use "delete": (delete item huge-list :key #'my-key) Or do I need to do: (setq huge-list (delete item huge-list :key #'my-key)) In the Reference, it says, "..., or sequence may be unchanged and another sequence returned.", which would seem to make "delete" different from "nconc" in this respect. So destructiveness is an option for the convenience of LISP implementation creators, not users? Wayne Folta (folta@cs.umd.edu 128.8.128.8)