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,93590e6c825ce084 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "(see below)" Newsgroups: comp.lang.ada Subject: Re: using interface types: guru assistance begged Date: Fri, 07 Jul 2006 18:54:24 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: individual.net 2CUokiupsn6BE+9trqKcYQFCRxZXCcTb9bOMQvQL2ESltnO6Fb User-Agent: Microsoft-Entourage/11.2.4.060510 Thread-Topic: using interface types: guru assistance begged Thread-Index: Acah7mGyoGweDg3hEdur7QARJIjQTg== Xref: g2news2.google.com comp.lang.ada:5555 Date: 2006-07-07T18:54:24+01:00 List-Id: On 6/7/06 23:50, in article lqqdnR6QtY_nDjDZnZ2dnUVZ_oadnZ2d@megapath.net, "Randy Brukardt" wrote: >> As written this compiles and runs correctly. > > If it does, I'd be amazed. You define something called "a_set", and then a > bit later do various operations on "a_word_set" which is never defined > anywhere. My original guess was that you forgot to change some names. Oops, sorry, yes - I must have copied from an out-of-date editor window. 8-( (The consistent code *does* compile & run correctly.) > But in any case, the quick answer is no. ... > But, if you could hide interfaces, you'd have to break privacy by looking > into the private part in order to determine whether it was OK to add an > interface to the type. (If you didn't do that, you could add the same > interface twice, with different operations defined each time. Then, if > dispatched on Interface'Class(), which operation would be called? It would > be very hard to tell.) Right. I see that (I think 8-). > So Ada 2005 does not allow hiding of interfaces; all of the interfaces used > in the full view also have to be used on the private view. (They don't > necessarily have to have the same names, just the same set of interfaces.) > > Rules of thumb: ... OK. That's very illuminating. Many thanks for the comprehensive tutorial. -- Bill Findlay chez blueyonder.co.uk