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: a07f3367d7,2078ce7aac45af5b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.224.219.144 with SMTP id hu16mr8577590qab.1.1352810106052; Tue, 13 Nov 2012 04:35:06 -0800 (PST) Received: by 10.52.175.73 with SMTP id by9mr4334549vdc.1.1352810106016; Tue, 13 Nov 2012 04:35:06 -0800 (PST) Path: gf5ni18188417qab.0!nntp.google.com!c7no24325867qap.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 13 Nov 2012 04:35:05 -0800 (PST) In-Reply-To: <50a224b0$0$9523$9b4e6d93@newsspool1.arcor-online.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=20.133.0.8; posting-account=g4n69woAAACHKbpceNrvOhHWViIbdQ9G NNTP-Posting-Host: 20.133.0.8 References: <0114d327-9f9f-4ad2-9281-56331d11a90c@googlegroups.com> <50a224b0$0$9523$9b4e6d93@newsspool1.arcor-online.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <8332147c-e574-4970-9b88-5bc27546c42f@googlegroups.com> Subject: Re: Ada202X : Adding functors From: Martin Injection-Date: Tue, 13 Nov 2012 12:35:06 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-11-13T04:35:05-08:00 List-Id: On Tuesday, November 13, 2012 10:45:05 AM UTC, Georg Bauhaus wrote: > On 13.11.12 00:19, Martin wrote: >=20 > > I don't think it would need to extend to existing code or to explicit c= alls, only to functors - would that be more acceptable? >=20 >=20 >=20 > But is adding syntactic implicitness of ?() enough? >=20 >=20 >=20 > Isn't there more about "functors"? And if so, wouldn't Ada >=20 > generics have to become "more recursive" so as to get all the >=20 > benefits of using "functors" in a generalized and checked fashion? >=20 >=20 >=20 > http://www.catonmat.net/blog/on-functors/ >=20 >=20 >=20 > (Otherwise, overloading "()" just looks like catering to those who >=20 > write programs in a style that is between lazy (avoiding names) and >=20 > obfuscating.) I would have no problems with an attempt to make Ada Generics more 'recursi= ve' as you put it...I'm finding a lot of milage in some of C++ templates. One mod could be for generics to say that a generic type parameter could be= specified in terms of an interface type but that actual parameter need not= be derived from that same interface type - providing that it met the contr= act of the interface type(s), i.e. allow Duck-ish Typing for interface type= s. It isn't Duck Typing, as the generic still has the contract...but I think i= t could open up Ada generics to some interesting (and still safe...I think!= The compiler would still have to check the instantiation) directions... I'm thinking out loud on this one... :-) -- Martin