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!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!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> <484BB4A1.1010505@gmail.com> Date: Sun, 8 Jun 2008 12:53:16 +0200 Message-ID: <1p5qjp0ns2znf.1cpjk3j4r4ssv$.dlg@40tude.net> NNTP-Posting-Date: 08 Jun 2008 12:53:17 CEST NNTP-Posting-Host: 1dba2092.newsspool1.arcor-online.net X-Trace: DXC=Nf4B\Tg206Mj7E:bke<5HFic==]BZ:afN4Fo<]lROoRA<`=YMgDjhgBiWaQX2>F]dF[6LHn;2LCVN[ On Sun, 08 Jun 2008 10:29:53 +0000, Sebastien Morand wrote: > The problem is, if you can't anymore use the string in the body of > the function, only in the subblock. Which is absolutely consistent. Consider it as follows. When the initialization of an object used in the subprogram body may fail, that means for the body, that there are two different cases: 1. Object exists, legally initialized of course [case A] 2. No object exists (because it cannot go through initialization) [case B] This means that the body shall necessarily consist of two parts. Note that the precondition of B is weaker than one of A. So B can contain A, but not reverse. Therefore there exist only two variants: 1. A nested in B (this what Ada provides) 2. A side by side with B. This would require some syntax extensions, like Niklas has outlined, but without obvious advantages. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de