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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1fa85f3df5841ae1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news2.google.com!newsread.com!news-xfer.newsread.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!217.73.144.45.MISMATCH!ecngs!feeder2.ecngs.de!newsfeed.freenet.de!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada.Containers.Vectors - querying multiple elements Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <426e4c2b$0$7515$9b4e6d93@newsread2.arcor-online.net> <0uYbe.542$BE3.229@newsread2.news.pas.earthlink.net> <1wjh6qsazg3rg$.lupowyuqu0tw$.dlg@40tude.net> <1O2dnYJF_uSxAejfRVn-2Q@megapath.net> <14ts2mrny7fci.emc3y6pqq7za$.dlg@40tude.net> <1alsbsqw53l3o$.dud3ip2gd2m5$.dlg@40tude.net> Date: Sat, 7 May 2005 09:17:17 +0200 Message-ID: <1uiwalrzueyt1.1umi4h3bvr71u.dlg@40tude.net> NNTP-Posting-Date: 07 May 2005 09:17:14 MEST NNTP-Posting-Host: 47de54b8.newsread2.arcor-online.net X-Trace: DXC=1f;1X8W^XO^UEj^fn36YV^Q5U85hF6f;TjW\KbG]kaMX:cmYYm_h3\S13:QQAVKlQ]WRXZ37ga[7Zeh9Z=IkP^1T8TE1d79d54V X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:10946 Date: 2005-05-07T09:17:14+02:00 List-Id: On Sat, 07 May 2005 01:20:21 GMT, Matthew Heaney wrote: > "Dmitry A. Kazakov" writes: > >> In an imaginary, better Ada there should be unordered, uncountable >> types which would still allow containers. There would be no way to >> enumerate elements in such container, but for any given X it would be >> possible to Is_In (X, C). Even for such weak types there should be >> empty containers such that Is_In returns false for any X. > > Tell me, Dmitry, how do you intend for predicate Is_In to be > implemented, if the objects in the container are neither ordered nor > enumerable? That's an implementation detail! (:-)) But OK, here are many ways depending on the concrete case. For example: an unordered, uncountable index is just a public view. The container is free keep an array indexed by plain numbers. Objects might be uncountable, but we can count containers instead. So we attach the list of containers in which an object participates to the object. Or else we could maintain a global incidence matrix ... and so on and so far. My point actually was: empty containers and index ranges (sets) must be! -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de