Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site mit-eddie.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!harvard!think!mit-eddie!barmar From: barmar@mit-eddie.UUCP (Barry Margolin) Newsgroups: net.lang.lisp Subject: Re: Responses to: "LISP" by Winston & Horn: is the 2nd Edition better? Message-ID: <4384@mit-eddie.UUCP> Date: Mon, 3-Jun-85 03:39:46 EDT Article-I.D.: mit-eddi.4384 Posted: Mon Jun 3 03:39:46 1985 Date-Received: Tue, 4-Jun-85 00:51:38 EDT References: <2433@wateng.UUCP> Reply-To: barmar@mit-eddie.UUCP (Barry Margolin) Distribution: net Organization: MIT, Cambridge, MA Lines: 31 In article <2433@wateng.UUCP> ksbszabo@wateng.UUCP (Kevin Szabo) writes: >For example when they discuss property lists they mention how to get >values off the plist (with get) but they do not mention the function to >put properties on the property list (put). Instead they use a macro >(setf) which is used to set other things as well. > >wisc-ai!neves (David Neves) Common Lisp doesn't have a "put" or "putprop" function. The only way to put items on the property list in Common Lisp is with "setf". These functions were probably not included so that the CL designers didn't have to decide between the various incompatible argument orders that were used by the corresponding functions in the dialects that were being coalesced into CL. If you want a Maclisp-style putprop, it is an easy function to define given the CL facilities: (defun putprop (symbol value indicator) (setf (get symbol indicator) value)) By the way, I don't think "setf" is a macro in CL (it is a macro in Maclisp and Zetalisp). If it were, then there would have to be a "put" or "putprop" for it to expand into in the above use. But for many structures, such as property lists and arrays, "setf" is the only setter defined by the language, so it has to be a special form. Unfortunately, I'm not at my office (where my copy of Steele's CL book is) right now, so I can't check this out for sure. -- Barry Margolin ARPA: barmar@MIT-Multics UUCP: ..!genrad!mit-eddie!barmar