Re: Ada use of parens vs brackets

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
13 Dec 2004 02:00:06 -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: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Newsgroups: comp.compilers
Date: 13 Dec 2004 02:00:06 -0500
Organization: cbb software GmbH
References: 04-11-078 04-11-099 04-12-036 04-12-041 04-12-051
Keywords: Ada, design
Posted-Date: 13 Dec 2004 02:00:05 EST

> 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. ...


Uniformity goes even further. Ada does not distinguish parameterless
function calls and constant objects / named literals. So PART in the
example above might be a function call rather than a component. (That
would exclude update, though).


However I think that a more important reason is that both functions
and arrays are mathematically mappings. So there is no reason to
distinguish them syntactically. The difference is only in
implementation, an Ada was designed with separation of interface and
implementation in mind.


--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


Post a followup to this message

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