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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,de7dd126d6737f3a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!195.71.90.67.MISMATCH!news.unit0.net!noris.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Callback in Ada Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <8lc2d0Fb6jU1@mid.individual.net> <4cf0ec67$0$6882$9b4e6d93@newsspool2.arcor-online.net> Date: Sat, 27 Nov 2010 22:20:29 +0100 Message-ID: NNTP-Posting-Date: 27 Nov 2010 22:20:28 CET NNTP-Posting-Host: 046618d2.newsspool4.arcor-online.net X-Trace: DXC=_5_^l4PJT?4IUK[4Hb;b3J64\= X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:15682 Date: 2010-11-27T22:20:28+01:00 List-Id: On Sat, 27 Nov 2010 14:11:36 -0700, Jeffrey Carter wrote: > in the case of > access-to-subprogram, the anonymous form has an advantage over named types: they > allow passing access to a local subprogram ("downward funargs") without any of > the accessibility checks or worries that accompany named types. I can't say I'm > a fan of the syntax, but that's a useful capability. Nevertheless it is a language design flaw. The language should have had procedural types, i.e. instead of: procedure Foo (Closure : not null access procedure (I : Integer)); procedure Bar (I : Integer); ... Foo (Bar'Access); we would be able to write: procedure Foo (Closure : procedure (I : Integer)); procedure Bar (I : Integer); ... Foo (Bar); -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de