comp.lang.ada
 help / color / mirror / Atom feed
* Invocation of Shadowed Implementations in Ada 95
@ 1996-09-04  0:00 Larry Kilgallen
  1996-09-05  0:00 ` Jon S Anthony
  0 siblings, 1 reply; 3+ messages in thread
From: Larry Kilgallen @ 1996-09-04  0:00 UTC (permalink / raw)



I have read in "Object-Oriented Programming with Ada 9X",
Copyright 1993 by S. Barbey, M. Kempe, and A. Strohmeier
a description of "invocation of shadowed implementations".

>      procedure Display (M: Man) is
>        begin
>          Display (Human (M));  -- invocation of the shadowed implementation
>          Put (", male");
>          if Is_Bearded (M) then
>            Put (" is bearded");
>          end if;
>        end Display;

Is this really the way this is to be done ?

Although it is in the spirit of Ada syntax, it seems to me inferior
to the Macintosh Pascal approach of:

	inherited Display (M);

in that the Ada example requires revisiting many more procedures
if the type hierarchy is changed (unlikely for the particular
example given, but more likely in other situations).

Larry Kilgallen




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-09-06  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-09-04  0:00 Invocation of Shadowed Implementations in Ada 95 Larry Kilgallen
1996-09-05  0:00 ` Jon S Anthony
1996-09-06  0:00   ` Larry Kilgallen

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