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: bobduff@world.std.com (Robert A Duff) Subject: Re: maintenance of overriding subprograms Date: 1997/09/07 Message-ID: #1/1 X-Deja-AN: 270475504 References: <340C2EA5.B9F@gsfc.nasa.gov> <341065D7.4D41@gsfc.nasa.gov> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-09-07T00:00:00+00:00 List-Id: In article <341065D7.4D41@gsfc.nasa.gov>, Stephen Leake 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). ... If I were designing a new language from scratch, I would probably do this (that is, give some syntactic indication of the difference between overriding vs. not overriding). It doesn't seem easy to fit it into Ada in a clean, simple way. In particular, I don't like these suggestions: >... The presence/absence of >"new" or "pragma Confirm_Override" makes this clear. To me, "new" means "NOT overriding" -- that is, this subprogram represents a *new* capability not available for the parent type, as opposed to merely overriding an old capability. I find the pragma idea to be in bad taste -- pragmas shouldn't have such a strong effect on high-level semantics. >...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. Well, I suppose OOP-style programming is pretty hopeless without some sort of tool that can show you the complete interface, with all the inherited stuff included. - Bob