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,99e73f65ea2533b9 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news1.google.com!eweka.nl!lightspeed.eweka.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!feeds.phibee-telecom.net!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Tue, 02 Sep 2008 19:20:47 +0200 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: and then... (a curiosity) References: <18b41828-bda4-4484-8884-ad62ce1c831d@f36g2000hsa.googlegroups.com> <57qdnfULQ9tzKCHVnZ2dnUVZ_tHinZ2d@comcast.com> <48bd0003$1@news.post.ch> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <48bd75ef$0$7532$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 02 Sep 2008 19:20:47 CEST NNTP-Posting-Host: 7a9b3a49.newsspool1.arcor-online.net X-Trace: DXC=;GiC[l4gQcaOKO]LCQ@0g`ic==]BZ:afn4Fo<]lROoRa<`=YMgDjhgbX4e@\4LDYIfnc\616M64>jLh>_cHTX3jmCEUaYZbVcjd X-Complaints-To: usenet-abuse@arcor.de X-Original-Bytes: 2632 Xref: g2news1.google.com comp.lang.ada:1874 Date: 2008-09-02T19:20:47+02:00 List-Id: stefan-lucks@see-the.signature schrieb: > IMHO, much better style is the following: > > declare > Tmp_A: Boolean := A(X); > Tmp_B: Boolean := B(X); > begin > if Tmp_A and Tmp_B then ... end if; > end; > > This makes the programmers intention clear, "if A(X) and B(X)" doesn't. > > > But do you really dispute that following the mathematical conventions > as much as possible would improve readability? I agree with all of the above. However, after having seen much suffering from what people think are mathematical conventions used in programs, I think mathematical conventions should be verboten. Mathematical conventions are, unfortunately, *much* too vague to be good guidance. Most of the time they don't apply in computer programs. On the contrary, digital computers started their lives for exactly this reason: mathematics had no formalized steps and finite sets of numbers were uncommon. Mathematical assumptions make us think that Integer is an integer, which it isn't! As you have explained, there is no _|_ in the set of mathematical integers. A mathematics for computer programs would be different. Not like "high school operators" between "high school numbers". -- Georg Bauhaus Y A Time Drain http://www.9toX.de