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,ASCII-7-bit X-Google-Thread: 103376,ae67f75abbc71211 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-27 21:29:43 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: byhoe@greenlime.com (Adrian Hoe) Newsgroups: comp.lang.ada Subject: Re: Why not using [] instead of () for array? Date: 27 Feb 2002 21:29:43 -0800 Organization: http://groups.google.com/ Message-ID: <9ff447f2.0202272129.2bafcce8@posting.google.com> References: <9ff447f2.0202241719.446bf17b@posting.google.com> <3C7A8668.50BC257B@cl.cilas.net> <5ee5b646.0202262054.258490de@posting.google.com> <3c7c9767.727156@News.CIS.DFN.DE> NNTP-Posting-Host: 210.186.172.146 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1014874183 27237 127.0.0.1 (28 Feb 2002 05:29:43 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 28 Feb 2002 05:29:43 GMT Xref: archiver1.google.com comp.lang.ada:20550 Date: 2002-02-28T05:29:43+00:00 List-Id: dmitry@elros.cbb-automation.de (Dmitry A. Kazakov) wrote in message news:<3c7c9767.727156@News.CIS.DFN.DE>... > On 26 Feb 2002 20:54:03 -0800, dewar@gnat.com (Robert Dewar) wrote: > > >Toshitaka Kumano wrote in message news:<3C7A8668.50BC257B@cl.cilas.net>... > > > >> From a mathematical view, The syntax, > >> Output := Mapping (Input); > >> can be read "Input maps onto Input". > > > >Kumano-san states the mathematical argument very nicely > >here. Personally I tend to agree with this point of view. > > Yes, however analogy is not complete in Ada. At least three things > spoil this nice equivalence. For arrays one can do: > > 1. Result assignment. Mapping (Input) := Output > > 2. Index ranges. Subset := Mapping (From..To) > > 3. Aggregates > > This by no means invalidates the argument of course. Rather opposite, > one should support access results, user-defined index types (=>ranges, > slices), user-defined aggregates ... > > ... and maybe user-defined []-operator (:-)) > > Regards, > Dmitry Kazakov Kumano-san mathematical arguments are agreeable (at least with me:). And Kazakov's user-defined []-operator (proposed?) seems acceptable since Pascal provides alternative digraphs (. for [ :) At least, I get to know of this ASCII problem with programming languages. Anyway, I am comfortable with () and I will know to handle this question if ever comes to me again. :) -- Adrian Hoe -- http://greenlime.com/users/adrian.hoe