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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!cyclone1.gnilink.net!gnilink.net!nx01.iad.newshosting.com!newshosting.com!198.186.194.249.MISMATCH!news-out.readnews.com!transit3.readnews.com!panix!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: overriding in private part Date: Fri, 03 Oct 2008 16:29:21 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <45b4a4cc-13f5-4175-9061-9c962e32d762@64g2000hsm.googlegroups.com> <47e26a8d-d104-46c5-b841-667f6e556792@w7g2000hsa.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1223065763 22220 192.74.137.71 (3 Oct 2008 20:29:23 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 3 Oct 2008 20:29:23 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:CR9CIfJbJvREBdA2TL/GPmO47AI= Xref: g2news1.google.com comp.lang.ada:2222 Date: 2008-10-03T16:29:21-04:00 List-Id: Adam Beneschan writes: > I shouldn't have said "solve". It *partially* solves the problem, in > that if the programmers use "overriding" and "not overriding" > consistently on everything, it won't let you write a program that has > an unexpected result of the sort Maxim ran into. I think you should say "overriding" wherever it's legal, but never say "not overriding". And use a compiler that warns on missing "overriding" -- such as a recent GNAT with the -gnatyO switch. I agree that in the OP's example, P2 should be overriding -- this is a language design flaw. But at least you won't get in trouble at run time, if you follow the above convention. - Bob