From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!aioe.org!5WHqCw2XxjHb2npjM9GYbw.user.gioia.aioe.org.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Lower bounds of Strings Date: Fri, 8 Jan 2021 21:19:34 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <1cc09f04-98f2-4ef3-ac84-9a9ca5aa3fd5n@googlegroups.com> <37ada5ff-eee7-4082-ad20-3bd65b5a2778n@googlegroups.com> NNTP-Posting-Host: 5WHqCw2XxjHb2npjM9GYbw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader02.eternal-september.org comp.lang.ada:61068 List-Id: On 2021-01-08 18:23, Shark8 wrote: > On Thursday, January 7, 2021 at 3:03:54 PM UTC-7, Randy Brukardt wrote: >> Any sort of multiple inheritance (not to mention multiple dispatch) requires >> searching a lookup table for the appropriate interface. > Ah. > It appears you're confusing the Ada concept underlying keyword INTERFACE with the general/abstract notion. > It appears to me that Dmitry is referring to the latter, not the Ada-construct of INTERFACE, which requires a tagged type. > > I think what he's getting at is something that I considered/proposed here on C.L.A some years ago, adding the concept of an "ABSTRACT INTERFACE" to Ada. (IIRC, the proposal I had in mind was to be able to model the notional meta type-hierarchy; eg: Number ⊃ Universal_Integer ⊃ System.Integer.) Right, though I do not think that tags can inflict any cost. The situation is same as with array bounds. You do keep bounds when the array is statically constrained. Tag is just another constraint like bounds. It must be handled just same way, removed when statically known. No penalty, unless classes are actually used. I do not know why people always bring dispatch into discussions about static cases. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de