comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: Ada202X : Adding functors
Date: Wed, 14 Nov 2012 14:42:59 -0800 (PST)
Date: 2012-11-14T14:42:59-08:00	[thread overview]
Message-ID: <39c85c91-b1b9-4356-9f6c-112d47f202fe@googlegroups.com> (raw)
In-Reply-To: <ac7dccec-eeab-4fc0-a61a-890f0ec8a429@googlegroups.com>

On Wednesday, November 14, 2012 1:31:53 PM UTC-8, Martin wrote:
> On Wednesday, November 14, 2012 8:37:55 PM UTC, Dmitry A. Kazakov wrote:
> 
> > Because arrays do not have Perform operation, they do ()-operation.
> 
> 
> 
> 
> 
> Yes, there was a decision at some early point in Ada's life to move away from "[]" for array accessing to "()" - which seems to be a move to deliberately make it look like a function call.

No, I think the decision was based more on a Steelman requirement that programs can be written using a very limited character set, and [] weren't in that set.  Neither were some characters we're used to using, like double quote marks.  They got around that by defining alternate syntax for string literals.  But it shouldn't surprise anyone that they solved the array problem by using () for both indexes and subprogram calls, since there was a long history of using () in other languages for array indexes and often for both array indexes and function parameter lists (BASIC and Fortran, for example).  I've seen the idea promoted before that the syntax is the same because someone wanted some kind of equivalence between array indexing and calling a function, but I think it's nonsense (especially since you can say A(I) := B for an array indexing operation but not a function, so the two aren't really equivalent).

                             -- Adam



  reply	other threads:[~2012-11-14 22:42 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-12 22:09 Ada202X : Adding functors Martin
2012-11-12 23:14 ` Jeffrey Carter
2012-11-12 23:19   ` Martin
2012-11-13 10:45     ` Georg Bauhaus
2012-11-13 12:08       ` Yannick Duchêne (Hibou57)
2012-11-13 12:35       ` Martin
2012-11-12 23:44 ` Adam Beneschan
2012-11-13  2:11   ` Jeffrey Carter
2012-11-13 11:11   ` Martin
2012-11-14  0:51     ` Adam Beneschan
2012-11-14  8:39       ` Martin
2012-11-14 16:54         ` Adam Beneschan
2012-11-14 18:54           ` Martin
2012-11-14 20:37           ` Dmitry A. Kazakov
2012-11-14 20:57             ` Shark8
2012-11-14 21:31             ` Martin
2012-11-14 22:42               ` Adam Beneschan [this message]
2012-11-15  9:27               ` Dmitry A. Kazakov
2012-11-14 21:45             ` Simon Wright
2012-11-14 22:22               ` Martin
2012-11-14 22:27               ` Martin
2012-11-13  4:22 ` Shark8
2012-11-15  0:20 ` sbelmont700
2012-11-15  7:12   ` Martin
2012-11-15 12:21     ` Georg Bauhaus
2012-11-15 12:31     ` Georg Bauhaus
2012-11-15 12:46       ` Martin
2012-11-16  6:15       ` Randy Brukardt
2012-11-15 10:11   ` Dmitry A. Kazakov
2012-11-15 15:52     ` Peter C. Chapin
2012-11-15 17:04       ` Dmitry A. Kazakov
2012-11-15 19:57         ` Georg Bauhaus
2012-11-15 20:39           ` Dmitry A. Kazakov
2012-11-16  0:15             ` Peter C. Chapin
2012-11-16 10:12               ` Georg Bauhaus
2012-11-16  0:01         ` Peter C. Chapin
2012-11-16  6:09           ` Randy Brukardt
2012-11-16 12:35             ` Peter C. Chapin
2012-11-16 18:10               ` Martin
2012-11-16  8:59           ` Dmitry A. Kazakov
2012-11-16 12:20             ` Peter C. Chapin
2012-11-16 17:44               ` Dmitry A. Kazakov
2012-11-18 15:58                 ` Peter C. Chapin
2012-11-15 21:34     ` sbelmont700
replies disabled

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