From: mheaney@ni.net (Matthew Heaney)
Subject: Re: maintenance of overriding subprograms
Date: 1997/09/05
Date: 1997-09-05T00:00:00+00:00 [thread overview]
Message-ID: <mheaney-ya023680000509972108020001@news.ni.net> (raw)
In-Reply-To: 341065D7.4D41@gsfc.nasa.gov
In article <341065D7.4D41@gsfc.nasa.gov>, Stephen.Leake@gsfc.nasa.gov wrote:
>However, in addition to the maintenance problem (I had a hidden
>requirement :), I would like the source to give more immediate
>indication that we are intending the subprogram to override a parental
>one (and the others in the same spec do NOT). The presence/absence of
>"new" or "pragma Confirm_Override" makes this clear. I think it makes
>the source easier to read; one does not have to lookup all the primitive
>parental procedures (a good tool would help, of course). This can be
>done with comments, but those can get out of sync.
Actually, this is one area where I thought the language designers were too
conservative. I would have prefered that overriding subprograms be
explictly designated as such, using a keyword as "override", ie
type T is tagged private;
procedure Op (O : T);
type NT is new T with private;
override procedure Op (O : NT);
You should make the programmer assert his intent to override a primitive
operation, so he doesn't do it accidently. This clearly documents which
primitive operations of a derived type override those of its parent.
--------------------------------------------------------------------
Matthew Heaney
Software Development Consultant
<mailto:matthew_heaney@acm.org>
(818) 985-1271
next prev parent reply other threads:[~1997-09-05 0:00 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-09-02 0:00 maintenance of overriding subprograms Stephen Leake
[not found] ` <340DCE1D.6C5F@bix.com>
1997-09-04 0:00 ` John G. Volan
1997-09-07 0:00 ` Robert Dewar
1997-09-08 0:00 ` Robert A Duff
1997-09-09 0:00 ` Dan Johnston D.B.
1997-09-09 0:00 ` Tom Moran
1997-09-09 0:00 ` W. Wesley Groleau x4923
1997-09-10 0:00 ` Robert Dewar
1997-09-11 0:00 ` Dan Johnston D.B.
1997-09-12 0:00 ` Robert Dewar
1997-09-12 0:00 ` Richard A. O'Keefe
1997-09-12 0:00 ` Samuel Mize
1997-09-18 0:00 ` Shmuel (Seymour J.) Metz
1997-09-24 0:00 ` John G. Volan
1997-09-25 0:00 ` Shmuel (Seymour J.) Metz
1997-09-26 0:00 ` Richard A. O'Keefe
1997-09-05 0:00 ` Robert Dewar
1997-09-05 0:00 ` Stephen Leake
1997-09-05 0:00 ` Matthew Heaney [this message]
1997-09-07 0:00 ` Robert A Duff
1997-09-08 0:00 ` Tom Moran
1997-09-08 0:00 ` Stephen Leake
1997-09-08 0:00 ` W. Wesley Groleau x4923
1997-09-09 0:00 ` Robert A Duff
1997-09-09 0:00 ` Jon S Anthony
1997-09-10 0:00 ` Anonymous
-- strict thread matches above, loose matches on Subject: below --
1997-09-10 0:00 Marc Wachowitz
1997-09-29 0:00 Marin David Condic, 561.796.8997, M/S 731-96
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox