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,35d52809fb2aac8f 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!news.clara.net!wagner.news.clara.net!pe1.news.blueyonder.co.uk!blueyonder!text.news.virginmedia.com!53ab2750!not-for-mail From: "Dr. Adrian Wrigley" Subject: Re: Naming convention to identify functions with side effects User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table (Debian GNU/Linux)) Message-Id: Newsgroups: comp.lang.ada References: <5654ee5f-aa9f-4fff-87e0-45854b850f26@y38g2000hsy.googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: Mon, 29 Sep 2008 22:22:56 GMT NNTP-Posting-Host: 81.102.138.152 X-Complaints-To: http://netreport.virginmedia.com X-Trace: text.news.virginmedia.com 1222726976 81.102.138.152 (Mon, 29 Sep 2008 23:22:56 BST) NNTP-Posting-Date: Mon, 29 Sep 2008 23:22:56 BST Xref: g2news1.google.com comp.lang.ada:2147 Date: 2008-09-29T22:22:56+00:00 List-Id: On Mon, 29 Sep 2008 11:17:42 -0700, Hibou57 wrote: > Hello every body out there, > > Do some one know a commonly used or at least a good, naming convention > to identify functions with side effects ? All functions have side effects - unless you prefix them with "Pure_". So you would have: function Pure_Polynomial (...) return Float; Programmers generally expect functions not to be pure. So mark the ones which are pure to alert the user. If you can be bothered. I've never seen it used though! -- Adrian