comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Brantley <robert.brantley@lmco.com>
Subject: Re: Comment from the trenchs
Date: 2000/04/12
Date: 2000-04-12T00:00:00+00:00	[thread overview]
Message-ID: <38F495F5.C54559C6@lmco.com> (raw)
In-Reply-To: 8ckfsp$ab8$1@nnrp1.deja.com



Robert Dewar wrote:

> In article
> <Pine.BSF.4.21.0004061305320.6588-100000@shell5.ba.best.com>,
>   Brian Rogoff <bpr@shell5.ba.best.com> 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.





  parent reply	other threads:[~2000-04-12  0:00 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-27  0:00 Why is it Called a Package? Gary Scott
2000-03-27  0:00 ` Ted Dennison
2000-03-27  0:00 ` Larry Kilgallen
2000-03-27  0:00   ` Robert A Duff
2000-03-28  0:00     ` Gary Scott
2000-03-27  0:00 ` Nick Roberts
2000-03-27  0:00   ` Robert A Duff
2000-03-29  0:00     ` Florian Weimer
2000-03-29  0:00       ` Robert A Duff
2000-03-30  0:00         ` Geoff Bull
2000-03-30  0:00           ` Robert A Duff
2000-03-30  0:00             ` Jean-Marc Bourguet
2000-03-30  0:00               ` David Starner
2000-04-03  0:00               ` Robert A Duff
2000-04-06  0:00             ` Brian Rogoff
2000-04-07  0:00               ` Pascal Obry
2000-04-07  0:00                 ` Samuel T. Harris
2000-04-07  0:00                   ` Stanley R. Allen
2000-04-07  0:00                   ` Brian Rogoff
2000-04-08  0:00                     ` Robert A Duff
2000-04-07  0:00                   ` Richard D Riehle
2000-04-08  0:00                     ` Florian Weimer
2000-04-09  0:00                       ` Stefan Skoglund
2000-04-07  0:00                 ` Paul Graham
2000-04-07  0:00               ` Robert A Duff
2000-04-07  0:00                 ` Brian Rogoff
2000-04-07  0:00                   ` Robert A Duff
2000-04-08  0:00                     ` Brian Rogoff
2000-04-07  0:00               ` Robert Dewar
2000-04-07  0:00                 ` Brian Rogoff
2000-04-07  0:00                   ` Hyman Rosen
2000-04-07  0:00                     ` Brian Rogoff
2000-04-12  0:00                 ` Robert Brantley [this message]
2000-04-13  0:00                   ` Comment from the trenchs Jeff Carter
2000-04-17  0:00                     ` Robert Brantley
2000-03-28  0:00   ` Why is it Called a Package? Jean-Marc Bourguet
2000-03-28  0:00     ` Robert A Duff
2000-03-30  0:00     ` Alfred Hilscher
2000-03-31  0:00       ` Anders Wirzenius
2000-03-28  0:00   ` Ken Garlington
2000-03-29  0:00   ` Florian Weimer
replies disabled

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