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-Thread: 103376,12c1e4936587932e X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad.newshosting.com!newshosting.com!newspeer.monmouth.com!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: Sun, 05 Oct 2008 15:57:48 -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> <1vlrayvqx3imy.cp250cnppen5.dlg@40tude.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1223236669 28941 192.74.137.71 (5 Oct 2008 19:57:49 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sun, 5 Oct 2008 19:57:49 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:1iv7yG1ZO/5O388dJs0Rg1mn6jo= Xref: g2news1.google.com comp.lang.ada:2242 Date: 2008-10-05T15:57:48-04:00 List-Id: "Dmitry A. Kazakov" writes: > On Sat, 04 Oct 2008 15:47:04 -0400, Robert A Duff wrote: > >> If you use a compiler that warns on missing "overriding", then you don't >> need to say "not overriding", because that's the default -- any >> subprogram that doesn't say "overriding" is not overriding. >> Saying "not overriding" is just noise. > > [...] > >> I agree that if you want an indicator on every subprogram declaration, >> then forbidding "no overriding" on some non-overriding subprograms is a >> language design mistake. But I don't want that -- I want a safe >> (non-overriding) default. > > But non-overriding is unsafe. Taking your example with in and in-out, when > the programmer uses in instead of in-out, that does not change the program > semantics, so long the program remains legal. Otherwise (if the body > actually changes the parameter) it will not compile. This is safe. Good point, but I'm only half convinced. If you get in the habit of always saying "overriding" when appropriate, and you use the warnings, then you're unlikely to get into trouble. And the idea of putting "not overriding" all over the place seems awfully verbose, to me. - Bob