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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a02:5c8:: with SMTP id 69mr34939164jal.20.1546452711938; Wed, 02 Jan 2019 10:11:51 -0800 (PST) X-Received: by 2002:aca:5395:: with SMTP id h143mr568891oib.6.1546452711558; Wed, 02 Jan 2019 10:11:51 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!2.eu.feeder.erje.net!4.us.feeder.erje.net!feeder.erje.net!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!q69no65953itb.0!news-out.google.com!v141ni111ita.0!nntp.google.com!q69no65948itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 2 Jan 2019 10:11:51 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.168.19.89; posting-account=O_NgcgoAAABs6pgCjroQBmOBL5ZZGPUc NNTP-Posting-Host: 85.168.19.89 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <2a6929c5-72fa-4d84-953a-44ea4597ab38@googlegroups.com> Subject: Re: class wide iterable (and indexable) From: George Shapovalov Injection-Date: Wed, 02 Jan 2019 18:11:51 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:55166 Date: 2019-01-02T10:11:51-08:00 List-Id: Thanks! I'll try adding this and see if I can get around that invalid interface con= version.=20 I did see in the Ada.Containers.Vectors code two versions defined, however = I was not clear on why, especially since both the Ada Gem 10x (I forgot now= exact number) and Ada Rationale for 2012 seem to only provide one, with a = Cursor. Besides, that seemed to work just fine when specific types are decl= ared, only class-wide gave me trouble..=20 Interesting that indexing works fine, no confusion here (but of course it g= oes through other aspects, and there I had to change the name of the refere= nced function in derived type, otherwise the compiler was getting confused = too - I left a comment in the code to this effect).. However, from your response (also my general impression while digging throu= gh the iterables workings) is that this is not a common way to provide such= code unification. How then one is supposed to go about such feature?=20 On a related note, I was rather surprised that the related types in Ada.Con= tainers do not form such a hierarchy. Say both Ada.Containers.Vectors and I= ndefinite_Vectors (and especially now with addition of Bounded_Vectors too)= all could derive from a common ancestor that could be used to implement co= mmon functionality and let end user chose the desired data storage model..