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=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.ams3.giganews.com!Xl.tags.giganews.com!border2.nntp.ams3.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!proxad.net!feeder2-2.proxad.net!nx02.iad01.newshosting.com!newshosting.com!69.16.185.16.MISMATCH!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 01 May 2013 18:37:55 -0500 Date: Wed, 01 May 2013 19:37:54 -0400 From: "Peter C. Chapin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada 2012: In-out parameters for functions References: <7704abab-86f2-4edc-ad4b-b3d4e70004fb@googlegroups.com> In-Reply-To: <7704abab-86f2-4edc-ad4b-b3d4e70004fb@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-Jxn5PDS87do0Fx+h3reXe1710cNlWSDI+vHEP0jN6SE8zR6yqscCHVxPS+f1ULnKPQeTWvy1q1OEnhI!Tz80lJvrrHYYD1vQ4Z82hVRAoZ5HSgkm2Y2APFyeict7kEkynuBJ7jPjcLQuLTQ= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2571 X-Received-Bytes: 2269 Xref: number.nntp.dca.giganews.com comp.lang.ada:181340 Date: 2013-05-01T19:37:54-04:00 List-Id: On 05/01/2013 12:28 PM, dptrash@arcor.de wrote: > Why does Ada 2012 have in-out parameters for functions? > > Quote from the book 'Ada 2005 Rationale' (page 4): "[..] Indeed many other changes were rejected as really unnecessary. These include old chestnuts such as in out and out parameters for functions (ugh), [..]". Section 4.2 of the Ada 2012 Rationale addresses this question. One particularly interesting sentence is: "The big concern was that allowing parameters of all modes might open the door to dangerous programming practices but a solution to that was found in the introduction of stricter rules preventing many order dependences." Even in Ada 2005 it was permitted to pass access types to functions, effectively allowing a function to modify its parameter (via the access value). So in that respect not much has changed except that access types are no longer needed in yet another place in Ada. Peter