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,7f4d16c4ee371eb5 X-Google-Attributes: gid103376,public From: Robert Brantley Subject: Re: Comment from the trenchs Date: 2000/04/12 Message-ID: <38F495F5.C54559C6@lmco.com>#1/1 X-Deja-AN: 610234777 Content-Transfer-Encoding: 7bit References: <38DF7F38.8D656ABD@lmtas.lmco.com> <38DFB0BC.9FF72EFC@callnetuk.com> <87u2hq857e.fsf@deneb.cygnus.argh.org> <38E2A4A4.E59E997C@research.canon.com.au> <8ckfsp$ab8$1@nnrp1.deja.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Lockheed Martin Corporation Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-04-12T00:00:00+00:00 List-Id: Robert Dewar wrote: > In article > , > Brian Rogoff wrote: > > > I think if the syntax were to be redone I'd like the issue of > "()" versus > > "[]" for array indexing to be reexamined. Then we could also > think about > > some syntactic sugar for overloading "[]" as in C++. The > restrictions on > > the character set that were part of the original Ada > requirements don't > > make a lot of sense to me now, though the restriction to ASCII > is OK. > > There is no point in revisiting this, because nothing has > changed since Ada 95. The reason for not differentiating > [] vs () has to do with referential transparency (i.e. > arrays are conceptually like functions) not with character > set restrictions. > > Yes, there are arguments on both sides. > Only in the mind of a language designer having a theoretical discussion. Every week I have to look at Ada code I have never seen before. Having situations where array access looks just like subprogram calls is a BAD thing. It decreases the readability of the source, makes it harder to maintain, harder to validate and harder to test. It makes errors more likely. It makes the code more expensive and less reliable. The same thing is true about optional parenthesis on subprogram calls taking no parameters, although to a much less degree. Any argument based upon referentail transparency pales to insignificance when compared to the affect this has on real-world development and maintainability. If you are developing a new Ada-like language, please, structure the syntax so that array acesses and subprogram calls are differentiated and obvious. JMHO Robert Brantley robert.brantley@lmco.com > > Yes, these arguments are well known since 1960 > > Yes, these arguments were brought up during the Ada design > > No, they did not convince people that [] is a good idea > > No, nothing has changed that would suggest revisiting this issue > > The question of overloading indexing is of course a completely > separate one, since this is not a matter of syntax but > semantics, and is thus completely orthogonal. > > Sent via Deja.com http://www.deja.com/ > Before you buy.