From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,896d86ef3723978c X-Google-Attributes: gid103376,public From: dan@it.uq.edu.au (Dan Johnston D.B.) Subject: Re: maintenance of overriding subprograms Date: 1997/09/09 Message-ID: <5v3dlu$pgu$1@miso.it.uq.edu.au>#1/1 X-Deja-AN: 270967707 References: <340C2EA5.B9F@gsfc.nasa.gov> <340DCE1D.6C5F@bix.com> Organization: School of Information Technology, University of Queensland Newsgroups: comp.lang.ada Date: 1997-09-09T00:00:00+00:00 List-Id: In dewar@merv.cs.nyu.edu (Robert Dewar) writes: ><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.