This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GOOPS Debian packages


[I Cc to the list in case others are interested.]

Craig Brozefsky <craig@red-bean.com> writes:

> Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:
> 
> > Please upload the packages under
> > 
> >   http://www.nada.kth.se/~mdj/goops
> 
> Done, and uploaded.

Thanks!

> Why are you dropping slot-ref and slot-set! ?

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.

> For instance, they are useful if you are doing something like
> slapping instances into a database, because you can iterate over
> slots and use a (slot-ref to get their value, even if the slot does
> not have an accessor defined.

There will be no such thing as a slot totally without an accessor,
because the accessors will be the only way to access a slot.

In your example, you would probably do something like:

(for-each (lambda (slot-definition)
            (write (slot-ref obj (slot-definition-name slot-definition)) port))
  (class-slots (class-of obj)))

This will be replaced by something like

(for-each (lambda (slot-definition)
            (write ((slot-definition-reader slot-definition) obj) port))
  (class-slots (class-of obj)))

(We might have something akin to slot-ref-using-class which can be
 used instead of fetching the reader.)

> Why are slot-definitions not objects, but alists?

Because they were alists in STKlos.  It is definitely a plan to make
them objects.

> This seems alright unless you want to heavily exend the behavior of
> slot-definitions and want to be able to distinguish them by type.

Yes, this is the plan.

> What are the upstream and downstream slots on generic and
> extended-generic for?  Which I guess would be better answered by,
> what extended-generics are for at all.

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.

> Also, (describe object) seems to be missing, and is not listed as a
> task in the TODO.

(use-modules (oop goops describe))

/mdj

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]