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,86c750b8474bf6d5 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!feeder1.cambrium.nl!feed.tweaknews.nl!news.netcologne.de!newsfeed-hp2.netcologne.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: About String 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: <484ABED3.8040909@obry.net> <484b802a$0$23844$4f793bc4@news.tdc.fi> <484cfb49$0$6601$9b4e6d93@newsspool2.arcor-online.net> <484d1759$0$6620$9b4e6d93@newsspool2.arcor-online.net> Date: Mon, 9 Jun 2008 14:03:37 +0200 Message-ID: NNTP-Posting-Date: 09 Jun 2008 14:03:38 CEST NNTP-Posting-Host: 1ef55a55.newsspool2.arcor-online.net X-Trace: DXC=NN1eJ]j[h1[\PS5Xo=M[RVA9EHlD;3YcR4Fo<]lROoRQ8kFi_A On Mon, 09 Jun 2008 13:43:21 +0200, Georg Bauhaus wrote: > Why closures? I was about to mention nesting, which > solves this issue in Ada 95 and Ada: [...] Only to show what the thing is. [Nested function is a closure too.] > In a sense, Safe_T works just like constructors that don't raise. Yes, fail-safe declarations do not raise (per definition). >> Note, no magic stuff, no exception handlers in declarations, just a simple >> thing, which Ada should have had from the day one: functional types and >> literals of. > > With the function's full environment? Just usual stuff where access type (or a formal generic subprogram) is presently used instead. Certainly, no upward closures. So all accessibility checks would apply. I.e. you would not be able to return a local subprogram.[*] ------------ * Unless [which is a another IMO necessary step] the subprograms is conditionally pure relatively to the result's type scope. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de