Re: Sets and Lists, again

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Sat, 20 May 2006 15:22:18 GMT
Message-ID: <KuGbg.10248$A26.253338_at_ursa-nb00s0.nbnet.nb.ca>


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.

Is that president or presidency? If a president has two presidencies interrupted by an intervening term, does the president appear twice?

Or are we talking about the order of first election? That, of course, is derivable from presidency using the MIN aggregate or could easily be an attribute of President along with age when first elected and lots of other demographic information.

What if we want to use ordered operations like the above to determine the median age at first election? How does the list help us if it is ordered by year of first election? If we re-order the list by age, how do we put it back to the original order? Received on Sat May 20 2006 - 17:22:18 CEST

Original text of this message