This is the mail archive of the
mailing list for the Guile project.
Re: GOOPS Debian packages
- To: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Subject: Re: GOOPS Debian packages
- From: Craig Brozefsky <craig at red-bean dot com>
- Date: 05 Apr 2000 18:02:06 -0700
- Cc: guile at sourceware dot cygnus dot com, djurfeldt at nada dot kth dot se
- References: <E12cnIN-00041Ofirstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org>
Mikael Djurfeldt <email@example.com> writes:
> It is consistent with the name-centered Lisp language to use symbols
> as the "handle" for a slot. But it is more consistent with Scheme to
> instead skip the name and go directly on the object. The role of slot
> names in the MOP will be taken over by a slot-definition object. This
> will simplify code rather than complicating it.
Would we still having something akin to slot-definition-name? Perhaps
slot-definition-name doesn't have to be a symbol, but could be any
object. Naming slots is still useful, because it allows for
consistent reference to a particular slot-definition in a given class
without polluting the namespace. There are very practical uses for
that, particularly when one is extending slot-definitions to do things
like shadow objects in other processes, and save to DB (including
querying objects IN the DB). Using the CLOS MOP I built an CLOS->SQL
mapping framework which using slot-name to generate SQL for querying
objects in the database, for example
(sql:select <baz> :where [= [slot-value <baz> fooslot] 42])
Would returns me all the <baz> objects in the database, whose fooslot
were equal to 42. In such a system, slots are explicit entities with
a name and instructions for mapping them to the database. This does
not need to have (slot-ref and (slot-set!, but just named slots. If
you didn't support named slots in the GOOPS default slot-definition
object, I could extend it to have a name, but it seems like a
reasonably useful property for all slots, like easier for debugging,
inspecting and all sorts of things.
I guess my point is that slots seem to naturally have a name, wether
it's in CLOS, or attributes in Java or ObjC or C++. So it would be a
good thing to let them be accessed by name.
> (We might have something akin to slot-ref-using-class which can be
> used instead of fetching the reader.)
We should definetly have something like that, not because it's a way
to access the slot, but because it's a hook to customize slot
> This is still kind of experimental. It will be possible to merge
> generics so that the result contains the methods of all merged ones.
> When I've implemented this feature, I'll ask people to have a look at
> it. If it turns out to be a bad idea, we'll remove it.
Hmm, sounds interesting.
> > Also, (describe object) seems to be missing, and is not listed as a
> > task in the TODO.
> (use-modules (oop goops describe))
I discovered that moments after sendin the email 8)
Craig Brozefsky <firstname.lastname@example.org>
Free Scheme/Lisp Software http://www.red-bean.com/~craig
"Hiding like thieves in the night from life, illusions of
oasis making you look twice. -- Mos Def and Talib Kweli