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 00:48:20 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!tar-alcarin.cbb-automation.DE!not-for-mail From: dmitry@elros.cbb-automation.de (Dmitry A. Kazakov) Newsgroups: comp.lang.ada Subject: Re: Why not using [] instead of () for array? Date: Wed, 27 Feb 2002 08:48:18 GMT Message-ID: <3c7c9767.727156@News.CIS.DFN.DE> References: <9ff447f2.0202241719.446bf17b@posting.google.com> <3C7A8668.50BC257B@cl.cilas.net> <5ee5b646.0202262054.258490de@posting.google.com> NNTP-Posting-Host: tar-alcarin.cbb-automation.de (212.79.194.111) X-Trace: fu-berlin.de 1014799699 7939982 212.79.194.111 (16 [77047]) X-Newsreader: Forte Free Agent 1.21/32.243 Xref: archiver1.google.com comp.lang.ada:20503 Date: 2002-02-27T08:48:18+00:00 List-Id: 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