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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ad06d2d7cb045687 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.213.68 with SMTP id nq4mr14757177pbc.2.1328039054093; Tue, 31 Jan 2012 11:44:14 -0800 (PST) Path: lh20ni245872pbb.0!nntp.google.com!news2.google.com!goblin1!goblin.stu.neva.ru!noris.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Tue, 31 Jan 2012 20:44:07 +0100 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Silly and stupid =?UTF-8?B?cG9zdOKAkWNvbmRpdGlvbiBvciBub3TCoA==?= =?UTF-8?B?Pw==?= References: <12kegkefstjiy.115bw2vmx23ll.dlg@40tude.net> <4f27b5e8$0$6628$9b4e6d93@newsspool2.arcor-online.net> <19jyp0vyqkcop$.6oatj9p6pcp1$.dlg@40tude.net> <4f27dfa5$0$6570$9b4e6d93@newsspool4.arcor-online.net> <12pod8zxdo56v.16pnewlc853au$.dlg@40tude.net> <4f280a00$0$6583$9b4e6d93@newsspool3.arcor-online.net> In-Reply-To: Message-ID: <4f284488$0$6634$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 31 Jan 2012 20:44:08 CET NNTP-Posting-Host: 5ea87c34.newsspool2.arcor-online.net X-Trace: DXC=HdBOC7a]=j0]E=H1Q9`787A9EHlD;3Yc24Fo<]lROoR18kFejV8c On 31.01.12 17:24, Dmitry A. Kazakov wrote: > On Tue, 31 Jan 2012 16:34:23 +0100, Georg Bauhaus wrote: > >> The program below is also an example of Ada's POV. > > I fail to see your point. The point is that from Ada's POV, there is a preference for detecting many things early. But this preference does not mean that all things would be detected by the compiler, or should be detected by the compiler. Ada provides for things checked at run-time, allowing programs to be written that can only be written because some amount of information need not be present at compile time. Ada does allow writing if statements without else part. Thus suppose the argument is that a postcondition should either state everything or, if this is not feasible, state nothing at all (True). From Ada's POV, then, nothing should ever be implicit, or unspoken. All if-statements should really be case-statements without "when others". Though shalt not write "if" without also stating what "else" should happen. Not saying that deferring until run-time, or leaving out the "else" part, is always a good idea, but given what Ada is, the motto all-or-nothing is not Ada's POV, IMHO. Hence, there is a mode of writing postcondition that lacks rigor but still reduces the risk of errors, by reducing their number, by informing the client programmer. Obviously, there are uses of Ada where one wants Count (Number_of_Errors) in Boolean. I cannot really think of a way the language can hope to do more than encourage this relation.