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,db88d0444fafe8eb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed.arcor.de!news.arcor.de!not-for-mail Date: Sat, 03 Sep 2005 22:01:03 +0200 From: Georg Bauhaus User-Agent: Debian Thunderbird 1.0.2 (X11/20050817) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Surprise in array concatenation References: <1125544603.561847.32140@g47g2000cwa.googlegroups.com> <14muavojz308w.1ouv7xin79rqu$.dlg@40tude.net> <4318486f$0$24154$9b4e6d93@newsread4.arcor-online.net> <43187a50$0$24162$9b4e6d93@newsread4.arcor-online.net> <11p5i525v2q5d$.17ayuwvqhazo1.dlg@40tude.net> In-Reply-To: <11p5i525v2q5d$.17ayuwvqhazo1.dlg@40tude.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <431a00cb$0$2113$9b4e6d93@newsread2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 03 Sep 2005 22:00:11 MEST NNTP-Posting-Host: 08367a47.newsread2.arcor-online.net X-Trace: DXC=4_VaI4mB:Weci]h2U0KHceQ5U85hF6f;djW\KbG]kaMhQ>n?D9BSA]lPjfLk[?NW@g8JM^O\[iIdc<1Veie\e\Rc X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:4423 Date: 2005-09-03T22:00:11+02:00 List-Id: Dmitry A. Kazakov wrote: > Just try to rewrite your program to make it working for any array type. A rewrite for any array (I presume: any index) will fail only where mathematically subtracting 4 from 3 will fail in N. > C++. But *programming* in C++ is an immense problem. See any parallel? Are you saying that C++ is less mathematical than Ada? > What about zero radius? If you want to play a Luddite, then start with > prohibiting empty strings. Do a writer need empty texts? Writers have used empty texts. Programmers frequently use empty strings, for I/O. > Do computers something which cannot be described using > mathematics? Yes, most real computers, if not all of them, cannot at all be shown to be a Turing machine equivalent. We do not even know whether or not the world's most often sold CPU works properly, at least not in a mathematically satisfying sense ("yes" or "no"). Now think of the peripherals, etc. A real computer is a statistically reliable device, but you cannot mathematically show that your desktop computer does what we believe it does. > That is not what you are saying. Then what? Another problem with computer mathematics is that it largely neglects continuous time, and bare I/O operations. Time is transformed into ticks, I/O is reduced to 'Valid plus compiler magic built on top of OS routines which mostly work - for whatever reason. Who can show, in mathematically sufficient detail, the way of some bits generated by a partition running on computer A sent to a partition running on computer B? (Who *wants* to do this? :) This requires statistics, rules of thumb, and experiments. > A trivial analysis shows inconsistency of A'First..A'First-1. The inconsistency of A'First..A'First - 1, if any, is relative to a set of definitions. It seem that off-bounds indices are a ubiquituous feature, found in several programming languages' algorithms and data structures. The indices avoid, for one thing, a proliferation of conditionals like if x'length = 0 then ... else perform(...) end if; Without the special test, you can unconditionally say forall things in x | P ... or as-soon-as cursor is off things in x | P ... Something that I think is frequently found in math literature ;-)