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,c1effc80c3046ad X-Google-Attributes: gid103376,public From: tarjeij@ulrik.uio.no (Tarjei Jensen) Subject: Re: Subscript brackets Date: 1996/05/03 Message-ID: #1/1 X-Deja-AN: 152749529 references: <4m515d$pok@calypso.bns.com.au> organization: University of Oslo, Norway newsgroups: comp.lang.ada Date: 1996-05-03T00:00:00+00:00 List-Id: >In article Robert Dewar writes: > The argument in favor of parentheses is one of uniformity of reference. > An array is, from a mathematical point of view, simply a function. > There is a special way of implementing the function efficiently, but > since at the abstract level it is a function, it should have the > same syntax as a function. > Which means that once again one has fallen into the trap of using something cute instead of waking up to the realities that as far as the programmer is concerned source code is text and not a mathematical expression. As far as I am concerned the "orthogonality" is far fetched and an excellent example of how to carry things too far. In my opinion one throws away an enhancement to readability by not using square braces. They would be useful in other situations as well. I prefer array[ n ] to array( n ) and record = [ field1, field2 ] to record = ( field1, field2 ). Greetings, -- // Tarjei T. Jensen // tarjeij@ulrik.uio.no || fax +47 51664292 || voice +47 51 85 87 39 // Support you local rescue centre: GET LOST! // Working, but not speaking for the Norwegian Hydrographic Service.