From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8eff44ec1bcf8433 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-16 01:14:44 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news-FFM2.ecrc.net!news.iks-jena.de!lutz From: lutz@iks-jena.de (Lutz Donnerhacke) Newsgroups: comp.lang.ada Subject: Re: Container reqs Date: Tue, 16 Oct 2001 08:14:38 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: <9qctpn$lil$1@news.huji.ac.il> <9qfglb$7sb$4@news.huji.ac.il> NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 1003220078 3579 217.17.192.37 (16 Oct 2001 08:14:38 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Tue, 16 Oct 2001 08:14:38 +0000 (UTC) User-Agent: slrn/0.9.6.3 (Linux) Xref: archiver1.google.com comp.lang.ada:14635 Date: 2001-10-16T08:14:38+00:00 List-Id: * Ehud Lamm wrote: >Lutz Donnerhacke wrote in message >> Bute seriosly it's necessary, that the same item occurs in several >> collections at once. It must be possible to build stacks of lists and hold >> a task element in a list and a hash simultaniously. Good luck. > >So we need defaults. "take a private type and supply default named >operations like Assign" No. You can't get Assign on most interesting types. There is none possible. My lib was designed to deal with this problem, but it is a first study. >But, I think we should decide on the semantics. If you can use >by-reference semantics, you can solv emany of these simply by >instantiating with access types. This can be problematic, but where >applicable cansave us a lot of trouble.. Access types are inherently dangerous. Furthermore it's not necessary to use access types. >> Keep them threadsafe and multiaccessed, i.e. allow the usage of active >> Iterator to create further Iterators which in turn modify the structure. > >I don't see any problem with this. declare i : Iterator'Class := Get_Iterator (collection); j : Iterator'Class := Get_Iterator (collection); begin while not Is_Finished (i) loop if something then j:=i; end if; if foobar then callmerecursivly_in_other_task; end if; if someother then Delete (j); end if; Advance (i); end loop; end; Do this for hashes, btrees in a multitasking enviroment without deadlocks.