From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2078ce7aac45af5b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.73.226 with SMTP id o2mr1302046pav.12.1352932979644; Wed, 14 Nov 2012 14:42:59 -0800 (PST) Received: by 10.50.10.165 with SMTP id j5mr410461igb.0.1352932979429; Wed, 14 Nov 2012 14:42:59 -0800 (PST) Path: s9ni10927pbb.0!nntp.google.com!kt20no15183322pbb.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 14 Nov 2012 14:42:59 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ NNTP-Posting-Host: 66.126.103.122 References: <0114d327-9f9f-4ad2-9281-56331d11a90c@googlegroups.com> <2bb9e5fa-04a2-4073-bca1-1739ce0580f1@googlegroups.com> <57bca956-2348-4825-8f5f-04fb91863696@googlegroups.com> <094f94ed-dbcc-4dba-bd9d-894a75f69037@googlegroups.com> <8373eaf3-5299-4bbb-a462-56d2d76d6333@googlegroups.com> <1na6brajyyab1.1m57ova8gzvwk$.dlg@40tude.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <39c85c91-b1b9-4356-9f6c-112d47f202fe@googlegroups.com> Subject: Re: Ada202X : Adding functors From: Adam Beneschan Injection-Date: Wed, 14 Nov 2012 22:42:59 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-11-14T14:42:59-08:00 List-Id: 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: >=20 > > Because arrays do not have Perform operation, they do ()-operation. >=20 >=20 >=20 >=20 >=20 > 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 deliber= ately make it look like a function call. No, I think the decision was based more on a Steelman requirement that prog= rams can be written using a very limited character set, and [] weren't in t= hat set. Neither were some characters we're used to using, like double quo= te marks. They got around that by defining alternate syntax for string lit= erals. 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) := =3D B for an array indexing operation but not a function, so the two aren't= really equivalent). -- Adam