comp.lang.ada
 help / color / mirror / Atom feed
From: kilgallen@eisner.decus.org (Larry Kilgallen)
Subject: Invocation of Shadowed Implementations in Ada 95
Date: 1996/09/04
Date: 1996-09-04T00:00:00+00:00	[thread overview]
Message-ID: <1996Sep4.163433.1@eisner> (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




             reply	other threads:[~1996-09-04  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-04  0:00 Larry Kilgallen [this message]
1996-09-05  0:00 ` Invocation of Shadowed Implementations in Ada 95 Jon S Anthony
1996-09-06  0:00   ` Larry Kilgallen
replies disabled

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