Article View: comp.lang.clos
Article #10Re: new instance structure protocol
From: Gregor Kiczales
Date: Thu, 29 Oct 1992 20:00
Date: Thu, 29 Oct 1992 20:00
27 lines
1921 bytes
1921 bytes
In article <9210290147.AA08205@gendibal.src.honeywell.com> alarson@src.honeywell.com (Aaron Larson) writes: Don't the "^^^" things indicate that getters and setters will always be called with no indication of the object? Shouldn't they be passed the object itself? For example, suppose that I wanted to store all slot information for all objects in a single hash table (or database, or...). The getter essentially must do a gethash, with a key which is a combination of the slot name, and some indication of the object, similarly for (setf slot-value). Shouldn't the above become: You are correct that, in the prototocol I proposed, the getters and setters do not receive the object. This means that if the getters and setters want an object id of some sort, they need to ask for that to be stored in a field of the object. One could change the protocol so that getters and setters received the object. If we were going to do that, I would suggest adding an aditional argument, rather than overloading an existing argument. I am working on an implementation of a very small CLOS, with a MOP, that has this protocol. Together with it are a bunch of examples of how to use it. (One neat thing about it is that it is all in Scheme.) The reflection and meta-level architectures workshop is next week, so I'll probably send it out the week of the 9th. Gregor
Technical Details
Message-ID:
<GREGOR.92Oct29120006@tracer-bullet.parc.xerox.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!biosci!parc!gregorReferences:
<9210290147.AA08205@gendibal.src.honeywell.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!biosci!parc!gregor From: gregor@parc.xerox.com (Gregor Kiczales) Newsgroups: comp.lang.clos Subject: Re: new instance structure protocol Message-ID: <GREGOR.92Oct29120006@tracer-bullet.parc.xerox.com> Date: 29 Oct 92 20:00:06 GMT References: <9210290147.AA08205@gendibal.src.honeywell.com> Sender: news@parc.xerox.com Organization: Xerox Palo Alto Research Center Lines: 27 In-Reply-To: alarson@src.honeywell.com's message of Thu, 29 Oct 1992 01:47:35 GMT