[Prev][Next][Index][Thread]
Re: Question about collections
Hugh Greene <q@tardis.ed.ac.uk> wrote:
> On Thu, 24 Feb 2000, Chris Double wrote:
> > neelk@brick.cswv.com (Neel Krishnaswami) writes:
> > >
> > > Does stretchiness mean that size can change without losing object
> > > identity, or is it something else? I'm guessing the latter from the
> > > fact that <list> isn't a <stretchy-collection>, but I'm honestly not
> > > sure.
> >
> > Chapter 8 (Collections) of the DRM describes <mutable-collection> and
> > <stretchy-collection> as:
> >
> > "Instances of <mutable-collection> can have their elements changed
> > after they are created. Instances of <stretchy-collection> can have
> > keys added and removed after they are created."
>
> In particular, these things have to be able to happen while preserving
> object identity.
Thanks. So my class should be a subclass of plain old <sequence>. This
is what I did originally, and then I started to have doubts. :)
Neel
References: