swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Example of sets and indexing


From: Paul E. Johnson
Subject: Re: Example of sets and indexing
Date: Sat, 24 Jul 1999 20:42:42 -0500

"Marcus G. Daniels" wrote:
> 
> >>>>> "AV" == Ajoy Victor <address@hidden> writes:
> 
> AV> How is this used?
> 
> AV> createIndex: aZone fromMember: anObject
> 
> It can be used in the situation where you have a collection that
> has the notion of keys and values.
> 
> See below for an example of createIndex:fromMember: and its use with
> Lists where members objects store the links (thus ensuring unique
> members and the notion of a `set').  Compare the two code sections
> within the "#if 1" area -- they are functionally equivalent.
> 

This is a highly informative note.  

I'm a bit confused because I got the idea from someone in this list that
we were discouraging the use of the ordered set class, instead
recommending people just use list.  The Swarmdocs say as much, I think,
in the writeup of ordered set.

Since you went to the trouble to write this down, I'm wondering what is
the recommended practice?  Is there any advantage to using the set
class?  The list class allows you to scan the items (remove:,
contains:).  Is there any reason a person should prefer the ordered set?
I guess I'm asking, has the OrderedSet class changed since the comments
in swarm docs were put in?  

Oh, one other question.  In your example, you create integers, cast them
as type id and add them to the set.

ps: thanks for the info on long doubles and M_El.

-- 
Paul E. Johnson                         email: address@hidden
Dept. of Political Science              http://lark.cc.ukans.edu/~pauljohn
University of Kansas                    Office: (785) 864-9086
Lawrence, Kansas 66045                  FAX: (785) 864-5700

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]