Re: Sets and Lists, again

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Sat, 20 May 2006 15:15:02 GMT
Message-ID: <WnGbg.10242$A26.253065_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]
>>
>>
>>>In
>>>general,  if a language implements sets,  why would the same language

>
> need
>
>>>to also implement lists?  What does it buy you?
>>
>>ripple delete of frames 105 - 140; insert of these songs in the
>>playlist at this point

>
> What's a ripple delete? How is it different from an ordinary delete?

Why do you bother with this idiot? Her statement has nothing to do with presidents and demonstrates nothing useful.

Ripple delete:

delete scene where frame between 105 and 140, update scene where frame > 140 set frame = frame + 105 - 140;

Non-ripple delete:

delete scene where frame between 105 and 140;

>>Obviously you can hand-code these functions, but why should you have
>>to?

>
> If you have sets, why would you have to "insert at this point"?

You wouldn't. You only need one kind of insert and one kind of delete. The self-aggrandizing ignorant cannot comprehend that that makes the language simpler. In her feeble mind, greater complexity for no benefit is a good thing.

>>>I'm thinking of Lisp, which implemented lists, but not sets.  MDL  (aka
>>>Muddle) implemented arrays, and that's one step closer to implementing

>
> sets,
>
>>>but not all the way.
>>>
>>>SQL implemented sets, but not lists.  Although local extensions of SQL

>
> do
>
>>>implement lists,  e.g. "Segmented Strings" in DEC Rdb (aka Oracle/Rdb),
>>>it's not really part of the language as such.
>>>
>>>I'm also thinking of Pascal, which implemented sets, (as bitmaps),  and

>
> also
>
>>>lists, albeit implicitly.  What I mean is that you can combine the

>
> concepts
>
>>>of "record" and "pointer" in Pascal to construct dynamic linked lists of
>>>whatevers.  But Pascal was primarily for teaching and learning

>
> programming,
>
>>>and may have implemented both for precisely that purpose.
>>>
>>>So,  if you have sets, why do you need lists?
>>
>>In order to take common functions and include them in a dbms library.
>>It is the same reason for any reusable code.  These functions include
>>those mentioned by Marshall in another thread (e.g. zip), ripple
>>delete, insert, select nth item in list...

>
> Why do you need lists for this purpose?

You don't. She is too stupid to recognize that relations already provide all of these operations in a far more reusable form. Received on Sat May 20 2006 - 17:15:02 CEST

Original text of this message