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!newsfeed.kamp.net!newsfeed.arcor.de!news.arcor.de!not-for-mail Date: Mon, 05 Sep 2005 15:22:18 +0200 From: Georg Bauhaus Organization: VoCal web User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050718 Debian/1.7.8-1sarge1 X-Accept-Language: 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> <431a00cb$0$2113$9b4e6d93@newsread2.arcor-online.net> <9s72daxfzb4f.1k7noh1qr5qpg.dlg@40tude.net> In-Reply-To: <9s72daxfzb4f.1k7noh1qr5qpg.dlg@40tude.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <431c465d$0$24150$9b4e6d93@newsread4.arcor-online.net> NNTP-Posting-Date: 05 Sep 2005 15:21:34 MEST NNTP-Posting-Host: f9ffd455.newsread4.arcor-online.net X-Trace: DXC=[;DT3GjkE5T\6[GEd:nl>[:ejgIfPPldTjW\KbG]kaMXea\9g\;7NmUhQcH`f8GlLUUUng9_FXZ=S>:=P9Ihe`BX@Z?dZ]MOidU X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:4441 Date: 2005-09-05T15:21:34+02:00 List-Id: Dmitry A. Kazakov wrote: I think I can abbreviate, by answering this one: > Huh, who can solve Maxwell's equations for a TV set? Does it mean that you > can create one ignoring laws of physics? You *are* ignoring the laws of physing in building a TV set because no one *knows* whether Maxwell's equations describe any particular TV set, and no one *can* perform a complete *test*. We try to approximate, and we do believe, that's what we do. If you claim *not* to ignore the laws of physics when building TV sets, then you will have to show that all of what you build is described by Maxwell's equations (etc.). It boils down to "very likely", "I don't see otherwise", etc. But there is no mathematical demonstration of Maxwell's law describing a TV set, or is there? The laws of physics provide helpful guidance, nothing more, nothing less. No claims, please, that something is physically lawful. Maxwell himself has asked us not to talk about electrons as if we knew that they exist, or what they are. A TV set might surprise us in suggesting that Maxwell's equations aren't complete. Frankly, I won't speculate that my old TV set will do this. Likewise, a computer might surprise us in suggesting that our fine mathematically thought-out program doesn't quite behave exactly as we thought, because of the naughty computer thingy and its quirks. > Re-read what you wrote: an off-bound [array] index is an array bound! Is it > "off" or not? (:-)) We have lo, hi: arrays -> I, item: arrays x I -> values If hi is onto [1, 2, ... 5], then item(hi(Some_Array, X)) lies in values, provided hi(Some_Array, X) is defined. For example, hi(Some_Array, 17) is undefined, generating an exception in Ada terms. If Some_Array'first = 42, hi(some_array, Some_Array'First) is undefined. Exception. Enough consistency here, for my taste. > Better ADT is what Ada needs. Is Ada a Must for you? These things are built into other programming languages. >> as-soon-as cursor is off things in x | P ... > > > No! This is an extremely bad idea borrowed for C pointer arithmetic. It > presumes that cursor might be off. It is a very strong assumption, which > may have a great impact on the algorithm: Certainly off-container indices/cursors offer a practical approach. > 1. The cursor have to have "off" values. Consider the type Character, > you'll need to extend it with two values, left and right. Presently Ada > does not support this. Do you insist that every subtype must be associated with an index subtype, such that every index value can be used to denote a value from the array? > 2. There should be a way to construct off-values. That might be very > non-trivial. Example: pointers. Try to find a pointer that does not point > to some object. The Eiffel solution is to (implicitly) have class NONE be an heir of every class in the system. So NONE conforms to every type, or every type is among the progenitors of NONE. There is a single instance of NONE, called Void. A reference that isn't attached to some object refers to Void. >>Something that I think is frequently found in math literature ;-) > > > I'm not a mathematician, so I cannot tell. But I think that the set theory > explicitly forbids unbound quantifiers, which would otherwise refer to the > set of "all things" (an equivalent of "off-set" thing.) It is no-no. You mean that the set to be enumerated is given? The set need not be finite in computing science, at least this is what I remember from the pleasant days of working my way through books on the subject. Existential quantifiers can be bounded or not, if they are bounded, you have bounded minimization (finding the smallest number such that ...).