Arrays vs Lists
miscdas at boxfrog.com
miscdas at boxfrog.com
Fri Dec 6 05:34:00 EST 2002
Dar Scott writes:
>
> On Thursday, December 5, 2002, at 10:12 AM, miscdas at boxfrog.com wrote:
>
>>> As for Dar's question about a list. IME, a list is an ordered delimited
>>> groups of words or phrases. The delimiter is usually, but not always a
>>> comma. I suspect that is not correct when you consider programming in
>>> general. But having spent a lot of time in Hypercard. That is what I
>>> consider one. You can delimit with anything, just be sure it doesn't
>>> pop up in you list items.
>>
>> Why restrict your definition to an ORDERED group of "things"? Granted
>> that intuitively, ordering renders the list more useful. But should it be
>> a requirement?
>
> I think in general in programming I would think _ordered_ is a requirement
> for "list". Also, in programming the "distance" or ease of access for
> data in the middle or end may not be as low as that for the front.
> Perhaps the word "sequence" would have less of that stigma.
>
> A more general term that would not include order might be a collection.
>
> I wasn't sure whether Revolutionaries used "list" for a string that
> separated inclosed data with delimiters, that with delimiters being
> lineFeeds specifically, or in the more general sense. I am tinkering with
> my library for packing up values into a sequence that I have called a list
> (slightly related to lists in functional lisp but without data sharing).
> I'm thinking about changing the name of these things to something else
> such as bundle so as to not cause confusion should my library escape.
>
> Dar Scott
>
> A more general term that would not include order might be a collection.
Or maybe a "set"
Well, I'm thinkig specifically about the case of creating and maintaining a
contact list. I have many "records" containing several data fields. I don't
care about the order when I create the "list" (database). I simply add
whatever new record I have to the end of the "list". The "list" has no
particluar order, and it doesn't need any particular order to either exist
or to be functional. Now when I WANT order, I choose some keys, such as
lastname, companyname, zipcode. I can then either actually order my "list"
by one of the keys, or simply leave the list "random" and let the database
do the sorting for display purposes. When I add a new contact, it can still
go at the end of the list, whether or not I previously did a "hard ordering"
on the list.
miscdas
More information about the use-livecode
mailing list