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,158ce2376534c35d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!weretis.net!feeder4.news.weretis.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Derived private interface Date: Fri, 8 Jul 2011 14:23:51 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: 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> <4e15b223$0$6541$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1310153033 22491 69.95.181.76 (8 Jul 2011 19:23:53 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 8 Jul 2011 19:23:53 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 Xref: g2news2.google.com comp.lang.ada:21116 Date: 2011-07-08T14:23:51-05:00 List-Id: "Georg Bauhaus" wrote in message news:4e15b223$0$6541$9b4e6d93@newsspool4.arcor-online.net... ... > What instances of Very Bad Things can be removed with the > help of indicators? The main one is a routine that did not override when it was expected to. This sort of bug cost us many hours of debugging time in Claw, because when you trace the logic of the program everything seems correct - just the wrong body is being called by dispatching routines and typically you can only figure that out by adding tracing to all of the bodies. Ugh! There are some very subtle visibility-based reasons that a routine will not be overriding, and no programmer can be expected to understand those. In particular, the "sibling inheritance" problem. The "overriding" indicator will at least cause the compiler to complain, and then the programmer can spend his time restructuring his entire system rather than pointlessly debugging. (This particular problem has no workaround; the package structure of the program has to be changed. We tried pretty hard to provide a workaround in Ada 2012, but we couldn't do so compatibly or even with just a compile-time incompatibility, and a runtime incompatibily is unacceptable. Blame interfaces for that - another reason that I hate them. :-) See AI05-0125-1 and the associated minutes for the details, if you care.) Randy. > 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. > > >