comp.lang.ada
 help / color / mirror / Atom feed
From: Kilgallen@SpamCop.net (Larry Kilgallen)
Subject: Re: Why not using [] instead of () for array?
Date: 24 Feb 2002 19:48:54 -0600
Date: 2002-02-24T19:48:54-06:00	[thread overview]
Message-ID: <vA1bIqExvWDT@eisner.encompasserve.org> (raw)
In-Reply-To: 9ff447f2.0202241719.446bf17b@posting.google.com

In article <9ff447f2.0202241719.446bf17b@posting.google.com>, byhoe@greenlime.com (Adrian Hoe) writes:

> "Why not use [] instead of () for array in Ada?"

I thought I had heard that certain keyboard limitations affected
the choice when Ada83 was being standardized.

> Two reasons for [] is preferred to ():
> 
> 1. More clarity, certainly leads to more readability.
> 
> 2. More distinguishable from functions parameters and leads to 1.

My understanding is that function parameters and array indices are
intentionally encoded with the same bracketing types to allow one
to be substituted for another in a subsequent version of a program.
A function might be more efficient for a very sparse array, even
though the logical construct is an array.



  reply	other threads:[~2002-02-25  1:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-25  1:19 Why not using [] instead of () for array? Adrian Hoe
2002-02-25  1:48 ` Larry Kilgallen [this message]
2002-02-25  3:14   ` Darren New
2002-02-25 10:14   ` Peter Hermann
2002-02-25  3:23 ` Dale Stanbrough
2002-02-25  5:28 ` David Starner
2002-02-25 14:39   ` Robert Dewar
2002-02-26  7:56     ` Mats Karlssohn
2002-02-27  4:52       ` Robert Dewar
2002-02-27 16:44         ` Darren New
2002-02-27 14:29       ` David Starner
2002-02-27  0:50     ` Adrian Hoe
2002-02-27 17:37       ` Jeffrey Carter
2002-02-25 18:46 ` Toshitaka Kumano
2002-02-27  4:54   ` Robert Dewar
2002-02-27  8:48     ` Dmitry A. Kazakov
2002-02-28  5:29       ` Adrian Hoe
2002-02-28 21:39       ` Florian Weimer
2002-02-27  1:09 ` Adrian Hoe
  -- strict thread matches above, loose matches on Subject: below --
2002-02-28  6:37 Christoph Grein
2002-02-28 22:56 ` Jeffrey Carter
replies disabled

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