comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Subscript brackets
Date: 1996/05/02
Date: 1996-05-02T00:00:00+00:00	[thread overview]
Message-ID: <dewar.831031371@schonberg> (raw)
In-Reply-To: 4m515d$pok@calypso.bns.com.au


Mike said

"Are there any plans to convert from parentheses to square brackets
for array subscripts in Ada?"

Apart from the fact that such a change would be a grautitous an
serious incompatibility at this stage, it is in fact considered
desirable to use parentheses for arrays, and there is no plan at
all to change, nor would such a suggestion be seriously entertained.

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.

Of course there is nothing to stop an implementation accepting sqaure
bracets as an alternative representation for normal parens (GNAT does
so with an error message :-)

Finally one cannot take seriously the suggestoni that this is a major
barrier to the use of Ada. Ada has, at this level, a quite diferent
syntax from the other languages you mention, and there is no intrinsic
merit in trying to mirror some other language for the sake of doing so.
Indeed even from a pragmatic point of view, such a change makes no sense.
You may make an Algol programmer epsilon more comfortable, but you would
make a Fortran or COBOL programmer epsilon less comfortable.






  parent reply	other threads:[~1996-05-02  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-30  0:00 Subscript brackets Michael Talbot-Wilson
1996-05-01  0:00 ` Robert I. Eachus
1996-05-02  0:00 ` Robert Dewar [this message]
1996-05-03  0:00   ` Tarjei Jensen
1996-05-02  0:00 ` Robert A Duff
1996-05-02  0:00   ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox