comp.lang.ada
 help / color / mirror / Atom feed
From: dan@it.uq.edu.au (Dan Johnston D.B.)
Subject: Re: maintenance of overriding subprograms
Date: 1997/09/09
Date: 1997-09-09T00:00:00+00:00	[thread overview]
Message-ID: <5v3dlu$pgu$1@miso.it.uq.edu.au> (raw)
In-Reply-To: dewar.873631018@merv


In <dewar.873631018@merv> dewar@merv.cs.nyu.edu (Robert Dewar) writes:

><<Clearly this error mode can occur without OO programming, but it's
>likely to become substantially more common with heavy use of derived
>types.>>

>What would be more interesting is to hear from people who have actually
>found this to be a problem ... often language experts sit around imagining
>things that do not really happen, so the most useful input on errors is
>input from people who actually run into them.

>Certainly in the case of GNAT, both the compile time and runtime error handling
>and in particular the choice of warnings that are needed are very much
>conditioned by user experience in running into problems.

I have certainly been caught by misspelling a routine intended to override
another.  This would not be a problem if the two cases were syntactically
distinguished.
To be more specific, I spelt "Initialize" as "Initialise" which is the
correct spelling of this word in Australian English.  ( I know the Americans
spell it with "ize", but am not sure how it is spelt by English people.)
Anyway, this attempted overriding of the routine in Ada.Finalization resulted
in a constraint error because of the failure to initialise the structure,
rather than a compiler error which one would normally expect from misspelling
an identifier.

It is hard to see what an Ada compiler can do about this in the general case
and, one wonders if it is worth the trouble in the specific case. (Are other
programmers so fixed in their ways that they have trouble adapting to
the American spelling? )

Anyway, in my opinion it is a language design fault that overriding routines
are not syntactically distinguished from "new" routines.

        dan.               dan@it.uq.edu.au
                             Dan Johnston, School of Information Technology,
                               University of Queensland, Australia.





  parent reply	other threads:[~1997-09-09  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. [this message]
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           ` 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-12  0:00           ` Robert Dewar
1997-09-05  0:00 ` Robert Dewar
1997-09-05  0:00   ` Stephen Leake
1997-09-05  0:00     ` Matthew Heaney
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