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: 103376,7ae8393ad9100e97 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.75.170 with SMTP id d10mr11575240pbw.6.1324125939448; Sat, 17 Dec 2011 04:45:39 -0800 (PST) Path: lh20ni32876pbb.0!nntp.google.com!news1.google.com!goblin1!goblin.stu.neva.ru!noris.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail User-Agent: NewsTap/3.5 (iPhone/iPod Touch) From: georg bauhaus Newsgroups: comp.lang.ada Mime-Version: 1.0 Message-ID: <1697334721345818104.523316rmhost.bauhaus-maps.arcor.de@news.arcor.de> Subject: Re: Ada2012 : When to use expression functions rather than function bodies? References: <12acbf57-01fc-43dd-8881-d39c2a63146b@q9g2000yqe.googlegroups.com> Date: 17 Dec 2011 12:45:38 GMT Organization: Arcor NNTP-Posting-Date: 17 Dec 2011 13:45:38 CET NNTP-Posting-Host: d96424b5.newsspool1.arcor-online.net X-Trace: DXC=WYWCcU?fN=[[7Non7UCi8Uic==]BZ:af^4Fo<]lROoRQ<`=YMgDjhgRi]hM0XAXMR X-Complaints-To: usenet-abuse@arcor.de Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 2011-12-17T13:45:38+01:00 List-Id: "Randy Brukardt" wrote: . > > You could write all of your preconditions like: > > procedure Do_It (A, B : in out Integer) > with Pre => Do_It_Precondition (A, B); > > but no one would have any idea what the precondition is. I'm guessing that Dmitry will suggest Procedure Do_It (A, B: Int_Sats_Pre) with Pre => True; will be safer and will convey the idea of the precondition better: it is in the type system. Whether this approach is feasible in general I don't know.