TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Date: Wed, 14 Oct 1998 12:56:59 -0500
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
Organization: SAIC
From: Larry Hazel <[log in to unmask]>
Parts/Attachments: text/plain (30 lines)
Tucker Taft wrote:

> Ben Brosgol wrote:
> > John Harbaugh wrote:
> >
> > >This illustrates a fundamental advantage of Ada:  It is difficult to
> > >write correct programs that have typos.
> >
> > I agree in general, but there is one pitfall in the case of OOP (which by
> > the way is not unique to Ada).  If you misspell the name of a subprogram
> > intended to override an otherwise implicitly inherited operation, then you
> > do not override it even  though you think you have.  ...
> A pragma like "pragma Overrides(...)" would seem to be a good thing
> to have here.  This should go on the "list" of useful pragmas for
> vendors to agree on...
> -Tuck

How about

  function new Financial_Aid ...

I know this would be a more drastic change than a pragma but it makes it
absolutely clear in the subprogram declaration that this is intended to override
an inherited function.

Larry Hazel