Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!think.com!barmar From: barmar@think.com (Barry Margolin) Newsgroups: comp.lang.clos Subject: Re: Is CLOS Object-Oriented ??? Keywords: CLOS, dynamic binding, setf, Flavors Message-ID: <1990Nov24.235733.29577@Think.COM> Date: 24 Nov 90 23:57:33 GMT References: <1990Nov15.101847.26285@diku.dk> <3904@s3.ireq.hydro.qc.ca> <27443D49.2BE8@wilbur.coyote.trw.com> Sender: news@Think.COM Distribution: comp Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 25 In article <27443D49.2BE8@wilbur.coyote.trw.com> scott@wiley.UUCP (Scott Simpson) writes: >I thought they were the same too until someone at work came up with >this problem in Flavors: > > (setf (send self (send button :slot-to-change)) value) > >What is happening is that (send button :slot-to-change) returns the >name of a slot to change and that slot is changed to VALUE on the >object SELF. How do you do this is CLOS? Unfortunately, the above isn't valid Flavors code (at least as far as my Symbolics machine is concerned). When I try to macroexpand it I get told that SETF of SEND requires the message name to be a constant. IMHO, the closest translation is: (funcall (slot-change-function button) self value) The SLOT-CHANGE-FUNCTION generic function would generally return a function of the form #'(setf ). -- Barry Margolin, Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar