This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Some questions about GOOPS and CLOS in general
thi <ttn@mingle.glug.org> writes:
> Mikael Djurfeldt writes:
>
> > Either you want an accessor (read/write) which is the standard case,
> > or you want a getter (read only). The only setter case is equivalent
> > to not having the slot at all.
>
> although this is reasonable, it is also reasonable that an object has
> write-only slots. eg., w1c bits in hw. for such things i think it is
> easiest to model w/ a write-only slot. perhaps supporting write-only
> slots makes goops design simpler?
You're right that write-only slots make sense. And, in fact, it is
very easy to create this kind of "virtual" slots in GOOPS.
But this doesn't change my argument in a significant way. Let's just
treat write-only slots the same way we treat read-onlåy slots.