using interface types: guru assistance begged
0 answers - 1407 bytes -

6/7/06 23:50, in article @megapath.net,
"Randy Brukardt" <randy@rrsoftware.comwrote:
>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.
, 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 K 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:
K. That's very illuminating.
Many thanks for the comprehensive tutorial.