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: a07f3367d7,158ce2376534c35d X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!goblin2!goblin.stu.neva.ru!feeder1.cambriumusenet.nl!feeder3.cambriumusenet.nl!feed.tweaknews.nl!212.27.60.9.MISMATCH!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 06 Jul 2011 09:55:44 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.18) Gecko/20110613 Thunderbird/3.1.11 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Derived private interface References: <27656578-65aa-48b9-9f89-4ebd4e0cb02a@glegroupsg2000goo.googlegroups.com> <0fe3b0f8-c064-444d-899d-640e891b58c3@w4g2000yqm.googlegroups.com> <128d8eb5-1cc6-47e3-a09b-b53a5ef289ce@m10g2000yqd.googlegroups.com> In-Reply-To: <128d8eb5-1cc6-47e3-a09b-b53a5ef289ce@m10g2000yqd.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4e141501$0$6629$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 06 Jul 2011 09:55:45 CEST NNTP-Posting-Host: 43c5d2a6.newsspool2.arcor-online.net X-Trace: DXC=1Bi=l_?^f1BC4i^e1BZ=_HA9EHlD;3YcB4Fo<]lROoRA8kFejVHB9hHHMO9:FLI;I3U>>M4PB X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:20088 Date: 2011-07-06T09:55:45+02:00 List-Id: On 7/6/11 6:34 AM, AdaMagica wrote: > I should have written > > overriding procedure Doit (X: access Derived_Class); Instead of sprinkling the program with overriding indicators, shouldn't it be normal for a compiler to detect the status of a subprogram WRT overriding? (It is, I think, and not just in Ada.) Consequently, programmers would mark the opposite case. They'd write "not overriding" only if a subprogram is really intended to not be overriding. Premises: - A subprogram is an overriding subprogram in most cases. + I.e., a subprogram following a type declaration is usually intended to override. Here, "usually" refers to OOD being ubiquitous. - Idiomatic use will suggest to place non-overriding subprograms in nested packages (factories, for example). - Compilers will warn in any case whenever they detect a subprogram that looks suspicious.