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!news3.google.com!feeder.news-service.com!weretis.net!feeder4.news.weretis.net!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Thu, 07 Jul 2011 15:18:27 +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/20110616 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> <4e141501$0$6629$9b4e6d93@newsspool2.arcor-online.net> <4b2728fc-6127-45d8-a314-9fc491701c26@g12g2000yqd.googlegroups.com> <82vcve4bqx.fsf@stephe-leake.org> In-Reply-To: <82vcve4bqx.fsf@stephe-leake.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Message-ID: <4e15b223$0$6541$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 07 Jul 2011 15:18:27 CEST NNTP-Posting-Host: 0f6a9e8a.newsspool4.arcor-online.net X-Trace: DXC=Le7n]l1I[5g]l@YUW5NBkn4IUKjLh>_cHTX3jmE;mQ9R9e[Xc X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:20116 Date: 2011-07-07T15:18:27+02:00 List-Id: On 07.07.11 12:37, Stephen Leake wrote: > If you don't put 'overriding' on all child operations, they silently > become non-overriding when the parent changes. Very Bad Things Happen. An indicator "not overriding" will also "help" when one adds a name to a parent that had already been used in a child type and has been duly marked "not overriding" there. It is only an early hint, though. For example, taking care of LSP substitutability is not an immediate consequence of the presence of overriding indicators, but the diagnosis is a start, if not the best IMHO. An indicator "overriding" will also help with c&p errors. For example, when forgetting to adapt parameter profiles to the child type. So this is about typos. What instances of Very Bad Things can be removed with the help of indicators? Some of the Very Bad Things happen mostly when the types do not inherit directly from abstract types or interfaces (as changing ops will then result in compilation errors). This, I think, can be termed The First Bad Thing. Bad things also happen, more generally, whenever some programming error would be prevented simply by adding indicators of suitable sorts that would explain the programmer's intention. But shouldn't this kind of information be covered by "normal" language instead? Or, for an alternative, one might imagine adding a "smart indicator pragma" pragma Fuzzy_Homographs (Threshold => 0.9); This, then, will prevent frequently quoted errors such as Initialse(...) vs Initialize(...). *Without* restricting the compiler's assistance to just tagged types! This, from my point of view, might equip the language with better means of addressing the real issue, which seems to be one of naming.