Re: Ada use of parens vs brackets

Nick Roberts <nick.roberts@acm.org>
16 Dec 2004 00:41:43 -0500

          From comp.compilers

Related articles
Re: Using Bison and Delphi mikehahn@rogers.com (Mike Hahn) (2004-11-20)
Re: Using Bison and Delphi vbdis@aol.com (2004-11-26)
Re: Using Bison and Delphi mikehahn@rogers.com (Mike Hahn) (2004-12-05)
Re: Using Bison and Delphi strohm@airmail.net (John R. Strohm) (2004-12-06)
Ada use of parens vs brackets arnold@skeeve.com (Aharon Robbins) (2004-12-11)
Re: Ada use of parens vs brackets mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2004-12-13)
Re: Ada use of parens vs brackets nick.roberts@acm.org (Nick Roberts) (2004-12-16)
| List of all articles for this month |

From: Nick Roberts <nick.roberts@acm.org>
Newsgroups: comp.compilers
Date: 16 Dec 2004 00:41:43 -0500
Organization: Compilers Central
References: 04-11-078 04-11-099 04-12-036 04-12-041 04-12-051
Keywords: Ada, design, comment
Posted-Date: 16 Dec 2004 00:41:43 EST

Aharon Robbins wrote:


> Earlier, I asked the question of where is there chapter and verse on
> why Ada chose parens for arrays. It was indeed so that arrays and
> functions look the same. An Ada expert friend of mine (Professor
> Richard J. LeBlanc of Georgia Tech) says: ...


Notwithstanding the evidence (of the Rationale) cited, I believe (but I am
not sure) that the main reason why square brackets [] were not used to
index arrays (as they are in Pascal and C et al) was that a set of 'basic
characters' were identified (by the Ada requirements documents, culminating
in a document named Steelman), and the square brackets were not in this set.


I suspect the same reason is why round parentheses () were chosen for array
(and other) aggragates, for which square brackets are used in Pascal, and
curly braces {} in C et al.


I would guess the reason why square brackets were not in the basic set was
probably because they were not in the EBCDIC character set at the time (and
IBM mainframes were of more importance then than they are now).


--
Nick Roberts
[I don't get it. Square brackets are in the Ada character set even though
they're not used in the syntax. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.