comp.lang.ada
 help / color / mirror / Atom feed
From: "(see below)" <yaldnif.w@blueyonder.co.uk>
Subject: Re: using interface types: guru assistance begged
Date: Fri, 07 Jul 2006 18:54:24 +0100
Date: 2006-07-07T18:54:24+01:00	[thread overview]
Message-ID: <C0D45E60.58A87%yaldnif.w@blueyonder.co.uk> (raw)

On 6/7/06 23:50, in article lqqdnR6QtY_nDjDZnZ2dnUVZ_oadnZ2d@megapath.net,
"Randy Brukardt" <randy@rrsoftware.com> 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
<surname><forename> chez blueyonder.co.uk





             reply	other threads:[~2006-07-07 17:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-07 17:54 (see below) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-07-06 15:20 using interface types: guru assistance begged (see below)
2006-07-06 22:50 ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox