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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ad988eb0a9545c86 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-13 18:51:50 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!news.iac.net!news-out.cwix.com!newsfeed.cwix.com!cpk-news-hub1.bbnplanet.com!washdc3-snh1.gtei.net!news.gtei.net!iad-peer.news.verio.net!news.verio.net!sea-read.news.verio.net.POSTED!not-for-mail Newsgroups: comp.lang.ada From: Brian Rogoff Subject: Re: Problem trying to implement generics. In-Reply-To: <9b85fj$25r$1@taliesin.netcom.net.uk> Message-ID: References: <9b46dr$cd8$1@taliesin.netcom.net.uk> <9b6jtu$4is$2@taliesin.netcom.net.uk> <9b6m27$68e$1@taliesin.netcom.net.uk> <0JBB6.10484$FD1.1197250@news6-win.server.ntlworld.com> <9b7tce$laf$2@taliesin.netcom.net.uk> <9b85fj$25r$1@taliesin.netcom.net.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Sat, 14 Apr 2001 01:44:05 GMT NNTP-Posting-Host: 206.184.139.136 X-Complaints-To: abuse@verio.net X-Trace: sea-read.news.verio.net 987212645 206.184.139.136 (Sat, 14 Apr 2001 01:44:05 GMT) NNTP-Posting-Date: Sat, 14 Apr 2001 01:44:05 GMT Organization: Verio Xref: supernews.google.com comp.lang.ada:6886 Date: 2001-04-14T01:44:05+00:00 List-Id: On Sat, 14 Apr 2001, Ayende Rahien wrote: > "Brian Rogoff" wrote in message > > Or, would you just allow procedures to return values? ;-) > > No, but I would like to have a function that I can place in an if (etc) that > change the variables I gives it. You can achieve this with access parameters, or the trick that Robert Duff described (which obviously only works for limited types). > It's not a big deal, I was just wondering what was the reason for this decistion. A desire to have Ada functions correspond more closely to mathematical functions, which don't modify their arguments? I think in general it is good style *not* to have functions modifying their arguments, but as usual there are relatively rare exceptions. I think it would have been better to allow out and in-out params, and make sure that programmers who abuse them are beaten severely. You're right, it shouldn't be too big of a deal for you. And I doubt it will ever change in any future version of Ada, since enough people seem to really like this restriction. -- Brian