Re: Sets and Lists, again

From: David Cressey <dcressey_at_verizon.net>
Date: Sat, 20 May 2006 14:37:45 GMT
Message-ID: <ZQFbg.763$nA2.127_at_trndny01>


"dawn" <dawnwolthuis_at_gmail.com> wrote in message news:1148132141.319639.75230_at_i39g2000cwa.googlegroups.com...
>
> David Cressey wrote:
> > "dawn" <dawnwolthuis_at_gmail.com> wrote in message
> > news:1148097777.431200.106670_at_j55g2000cwa.googlegroups.com...
> > > David Cressey wrote:
> > > > Recently, in a thread on implementing both threads and lists in a
> > > > programming language, the example of lists or sets of Presidents
arose.
> > I
> > > > mentioned that in a list of presidents, Grover Cleveland would
appear
> > once,
> > > > but in a list of presidencies, he would appear twice.
> > > >
> > > > Bob Badour asked what purppose would be served by a list of
presidents,
> > or
> > > > words to that effect. I'm interested.
> > > >
> > > > If one could have a set of presidents, why would one ever want a
list?
> > >
> > > president[40]
> > >
> >
> > I would think that arrays would be more useful than lists for this
purpose.
> >
> > Logically, they are equally useful. But you'd getter performance out of
the
> > array.
>
> At the logical level, I'm using the two terms interchangably. I
> recognize that any particular language might implement a list without
> an index or might have multidimentional arrays and not lists, but they
> can be the same thing. --dawn
>

So, at the logical level, why isn't a list just a set of entries with some natural order implied by one of its attributes? Why isn't it a good idea to postpone ordering until retrieval time? Received on Sat May 20 2006 - 16:37:45 CEST

Original text of this message