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-Thread: 103376,70414f56d810c10c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.11.199 with SMTP id s7mr25269085pbb.5.1317077026511; Mon, 26 Sep 2011 15:43:46 -0700 (PDT) MIME-Version: 1.0 Path: lh7ni5577pbb.0!nntp.google.com!news1.google.com!feed-C.news.volia.net!volia.net!news2.volia.net!feed-A.news.volia.net!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: discriminant questions Date: Mon, 26 Sep 2011 17:43:43 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <9f37b726-d80b-4d24-bf3f-28a14255f7fd@s20g2000yql.googlegroups.com> <01a1374f-59ab-40be-9e39-0640cb2a513d@n35g2000yqf.googlegroups.com> <1fp2o673mu9az$.d9loz1zbcl0d.dlg@40tude.net> <14tiipigyejtc$.hyp7e82egqwq$.dlg@40tude.net> <34d856bd-19a3-4bbf-b9d8-c0f100000ef4@k7g2000vbd.googlegroups.com> <1tpl2pc36ptr4$.txv4v3wmkjlm.dlg@40tude.net> <1malv6h6q31j3.uz9ws5j0glnm.dlg@40tude.net> <82ipojfw85.fsf@stephe-leake.org> <19iim6m72b6s4$.qe1pwkufdkzn$.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1317077025 15597 69.95.181.76 (26 Sep 2011 22:43:45 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 26 Sep 2011 22:43:45 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 X-RFC2646: Format=Flowed; Original Xref: news1.google.com comp.lang.ada:18139 Date: 2011-09-26T17:43:43-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:19iim6m72b6s4$.qe1pwkufdkzn$.dlg@40tude.net... ... > For generic programming you need Delete working in the same (specified) > way > for all container types of the set. Its effect on all iterators must be > defined and same. My point and the purpose of the example was that this is > extremely difficult to achieve, if possible. Humm, I wouldn't find that difficult to achieve at all. Surely if you are using Ada.Containers, Delete works the same way in all of them. Similarly, if you are building containers that are intentionally similar to Ada.Containers, you again will have the same effects. I realize that there is a very wide universe of container designs out there. A large part of the point of Ada.Containers was to select one and standardize on it -- since many of the choices are essentially equivalent, choosing a single solution was pretty much the only way to get some leverage on container libraries. So, for the vast majority of uses, Ada.Containers and extensions of it will be sufficient, and for those iterator semantics is well-defined. If you build you own iterators away from the Ada.Container model, you'll have to define your own semantics for things like Delete -- but one presumes that you have a good reason for doing that, so it should be worth the effort. Randy.