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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c7d533acec91ae16 X-Google-Attributes: gid103376,public From: bill@nospam Subject: Re: Question for the folks who designed Ada95 Date: 1999/04/28 Message-ID: <7g8390$225c@drn.newsguy.com>#1/1 X-Deja-AN: 472070682 References: <7g2qu4$ca4$1@usenet.rational.com> <37278218.ADE17A46@lawson.com> Organization: Newsguy News Service [http://www.newsguy.com] Newsgroups: comp.lang.ada Date: 1999-04-28T00:00:00+00:00 List-Id: In article <37278218.ADE17A46@lawson.com>, Brian says... > >> Robert Dewar writes: >> >> > What is missing from this discussion is an argument that >> > it is advantageous to distinguish array and function >> > references ... Yes, people want [] because they are >> > used to it from (some) other languages, but that's a >> > very weak argument. >> >> Function calls can have side effects; array indexing does not. >> It seems useful to distinguish those two. > >Arrays are potentially modifiable, functions are not. > >giving > > pure functions =similar to= constant arrays > functions with side affects > non constant arrays. > >Should it be usefull to syntatically distinguish between all these. you guys are all arguing like language lawyers (may be because you are :) we, your average run-of-the-mill programmers do not care about all this mumble jumble. All what we know, is that looking at something written as a[i] tells right away that it is an array, while with a(i) you are not sure what it is in Ada. If Iam maintaining someone else's code, it helps me to understand the code faster that way. Someone argument about them modifying the array to a function and not breaking someone else code (becuase in Ada "()" is used instead of "[]") is a very weak argument. In the real world, one would design their data to be hidden from users, and have access methods to read/write to it, (can we says OO here?) and so, users would never care if you used arrays or functions anyway. you should use 'messages' :) bill