TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
Larry Hazel <[log in to unmask]>
Reply To:
Date:
Wed, 14 Oct 1998 12:56:59 -0500
Content-Type:
text/plain
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

ATOM RSS1 RSS2