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.83.5 with SMTP id m5mr711984pay.33.1352912050318; Wed, 14 Nov 2012 08:54:10 -0800 (PST) Received: by 10.68.189.37 with SMTP id gf5mr7087671pbc.16.1352912050301; Wed, 14 Nov 2012 08:54:10 -0800 (PST) Path: s9ni10927pbb.0!nntp.google.com!kt20no14307374pbb.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 14 Nov 2012 08:54:09 -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> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <8373eaf3-5299-4bbb-a462-56d2d76d6333@googlegroups.com> Subject: Re: Ada202X : Adding functors From: Adam Beneschan Injection-Date: Wed, 14 Nov 2012 16:54:10 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-11-14T08:54:09-08:00 List-Id: On Wednesday, November 14, 2012 12:39:07 AM UTC-8, Martin wrote: > On Wednesday, November 14, 2012 12:51:03 AM UTC, Adam Beneschan wrote: >=20 > > On Tuesday, November 13, 2012 3:11:57 AM UTC-8, Martin wrote: > It may have been the intent to add only 'array-like' accessors to contain= ers but they've opened up something more... A new way to write obfuscated code? Why do you think this would convince m= e or anything else to support a language change? You're declaring a tagged= type, using aspects that are intended for implicit array referencing or us= er-defined access dereferencing, applying a parameter list to an object of = the tagged type, and expecting readers to figure out what you mean. And yo= u *still* haven't given any argument for why this would be better than just= adding a normal subprogram name (which I've called Perform in the snippet = below) and writing something like: F1 : Algorithm :=3D Double_Then_Power.Create (1.0); F2 : Algorithm :=3D Double_Then_Power.Create (2.0); F3 : Algorithm :=3D F1; -- Assigning one functor to another... begin Put_Line ("F1 :=3D " & Long_Float'Image (F1.Perform(2))); Put_Line ("F2 :=3D " & Long_Float'Image (F2.Perform(3))); Put_Line ("F3 :=3D " & Long_Float'Image (F3.Perform(1))); You can already do this in Ada 2005; no need to use the new accessor featur= es, which are confusing because you're trying to use them in a way they're = not intended to be used. You haven't given a good argument for why we need to change the language so= that programmers can write the above without the .Perform. So far, your o= nly arguments seem to be (1) you can do it in C++ and it's "very cool", and= (2) programmers can already abuse features of the language to make it look= the way you want, so we should enshrine it. Sorry, but it would take a lo= t more than that to convince me that we would need a language change.=20 -- Adam