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-Language: ENGLISH,UTF8 Path: g2news1.google.com!postnews.google.com!w7g2000hsa.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Ada Recursion with strings Date: Thu, 2 Oct 2008 01:18:45 -0700 (PDT) Organization: http://groups.google.com Message-ID: <003350e2-897d-4e9b-8acc-0ca715a55e89@w7g2000hsa.googlegroups.com> References: <2fJEk.367687$yE1.299201@attbi_s21> <758a1a91-7521-4ad3-9af0-a79d434ae60e@v28g2000hsv.googlegroups.com> <48e4772c$0$23609$4f793bc4@news.tdc.fi> NNTP-Posting-Host: 153.98.68.197 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1222935525 30604 127.0.0.1 (2 Oct 2008 08:18:45 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 2 Oct 2008 08:18:45 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: w7g2000hsa.googlegroups.com; posting-host=153.98.68.197; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20040924,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:2191 Date: 2008-10-02T01:18:45-07:00 List-Id: Niklas Holsti wrote: > Jean-Pierre Rosen wrote: > > Adam Beneschan a =EF=BF=BDcrit : > > > >> Yep, the advantage of that is that if the people who design the > >> Internet communication protocols suddenly decide that IP addresses are > >> going to use 9-bit bytes, all you have to do is change one constant, > >> rather than try to find all the 8's in your code and change them, > >> which is more error-prone. > >> > > Reminds me of an old advice explaining why named constants were better > > than numerical values. They took the example of Pi, saying it would mak= e > > maintenance easier "should the value of Pi change" :-) That's funny because I thought about the same thing when reading Adam's comment. > That reminds me of a former colleague, some decades ago, who was > tearing his hair out because his astronomical calculations with a > FORTRAN program were going wrong. Turns out he had the value of PI > as a variable in a COMMON area, after an array, and an indexing > error on this array was changing the value of PI, affecting several > trigonometric formulae... Looks like programmers have already made every mistake that could be made at least once :) Actually, that's what brought me to Ada in the first place. I thought to myself: "computer science and software engineering have been in existence for 50 years; yet we keep on making the same old stupid mistakes. Surely someone, somewhere, has found a way to learn from our mistakes and prevent them in the future?" -- Ludovic Brenta.