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.189.194 with SMTP id gk2mr11560833pbc.3.1324124782161; Sat, 17 Dec 2011 04:26:22 -0800 (PST) Path: lh20ni32827pbb.0!nntp.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!weretis.net!feeder4.news.weretis.net!news.teledata-fn.de!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: <352782378345816751.836638rmhost.bauhaus-maps.arcor.de@news.arcor.de> Subject: Re: Ada2012 : When to use expression functions rather than function bodies? References: Date: 17 Dec 2011 12:26:21 GMT Organization: Arcor NNTP-Posting-Date: 17 Dec 2011 13:26:21 CET NNTP-Posting-Host: d96424b5.newsspool1.arcor-online.net X-Trace: DXC=C_aUa^QCnNK@k=MdN::NBIic==]BZ:afN4Fo<]lROoRA<`=YMgDjhgB[lUC1AFhcnCkg0FVL3F2AEBU9LdCF\K]J4K?EFoMIC5F X-Complaints-To: usenet-abuse@arcor.de Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 2011-12-17T13:26:21+01:00 List-Id: Adam Beneschan wrote: . > > In most cases, it's probably OK to replace a function specification in > the *private* part of a package with an expression function if the > body is simple. But the encapsulation argument could still apply if > the function is intended to be usable by child packages. A pragma Pure is, I think, helpful when writing expression functions in particular if it forces thinking about the kind of functions one is writing: expression functions that have effects other than computing the result value seem out of (some) style.