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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no 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.220.136 with SMTP id hy8mr1808498qab.3.1353015250622; Thu, 15 Nov 2012 13:34:10 -0800 (PST) Received: by 10.49.73.228 with SMTP id o4mr606069qev.31.1353015250439; Thu, 15 Nov 2012 13:34:10 -0800 (PST) Path: gf5ni327qab.0!nntp.google.com!u2no116128qal.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 15 Nov 2012 13:34:10 -0800 (PST) In-Reply-To: <15w6caje3zsh$.t5nqtwoa77x5$.dlg@40tude.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=206.53.78.59; posting-account=ShYTIAoAAABytvcS76ZrG9GdaV-nXYKy NNTP-Posting-Host: 206.53.78.59 References: <0114d327-9f9f-4ad2-9281-56331d11a90c@googlegroups.com> <15w6caje3zsh$.t5nqtwoa77x5$.dlg@40tude.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Ada202X : Adding functors From: sbelmont700@gmail.com Cc: mailbox@dmitry-kazakov.de Injection-Date: Thu, 15 Nov 2012 21:34:10 +0000 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-11-15T13:34:10-08:00 List-Id: On Thursday, November 15, 2012 5:11:05 AM UTC-5, Dmitry A. Kazakov wrote: > > I doubt that could be made compatible with static typing. Comparing > > advantages of both static typing is a clear winner. > > I always envisioned a sort of access-to-subprogram parameter-type typing, though there are probably all sorts of esoteric problems and better ways. Otherwise it just seems like auto-generating the code a human normally has to write. package K is type Fancy_Lambda is lambda procedure (arg1 : T1; arg2 : T2); procedure P (x : Fancy_Lambda) is foo : T1; bar : T2; begin x(arg1 => foo, arg2 => bar); end P; end K; procedure main is baz : Integer; begin -- frakakta C++ syntax... K.P(x => [baz] (arg1 : T1; arg2 : T2) {baz := baz + 1}); end main;