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-24 19:28:14 PST From: Dale Stanbrough Newsgroups: comp.lang.ada Subject: Re: Why not using [] instead of () for array? Organization: RMIT References: <9ff447f2.0202241719.446bf17b@posting.google.com> User-Agent: MT-NewsWatcher/3.2 (PPC Mac OS X) Date: Mon, 25 Feb 2002 14:23:29 +1100 Message-ID: NNTP-Posting-Host: dale.cs.rmit.edu.au X-Trace: itsawnews.its.rmit.edu.au 1014607583 dale.cs.rmit.edu.au (25 Feb 2002 14:26:23 +1100) Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!sfo2-feed1.news.digex.net!intermedia!news-out.spamkiller.net!propagator-la!news-in-la.newsfeeds.com!news-in.superfeed.net!newsfeed01.tsnz.net!news.xtra.co.nz!news.mel.connect.com.au!newshub1.rdc1.nsw.optushome.com.au!harbinger.cc.monash.edu.au!vrn.edu.au!131.170.8.40.MISMATCH!itsawnews.its.rmit.edu.au!dale Xref: archiver1.google.com comp.lang.ada:20343 Date: 2002-02-25T14:23:29+11:00 List-Id: Adrian Hoe wrote: > "Why not use [] instead of () for array in Ada?" > > Two reasons for [] is preferred to (): > > 1. More clarity, certainly leads to more readability. > > 2. More distinguishable from functions parameters and leads to 1. I've done a bit of Ada programming, and never really found it to be a problem. Generally array accessing is fairly local in scope, and you can see/know where the array declaration is. For larger programs you tend to hide arrays behind functions/procedures (you can pragma inline them if needs be). In the end it's not going to lead to errors because any ambiguity will be picked up and flagged by the compiler. The only real reason for () vs [] in Ada is historical. Dale