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,CP1252 X-Google-Thread: 103376,f3437064e1091fec X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-15 17:22:55 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn13feed!wn12feed!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc51.ops.asp.att.net.POSTED!not-for-mail Message-ID: <3F149ADD.9040005@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: What evil would happen? References: <5ad0dd8a.0307111151.4a08f95a@posting.google.com> <5ad0dd8a.0307150019.5370f3a3@posting.google.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 66.31.71.243 X-Complaints-To: abuse@comcast.net X-Trace: rwcrnsc51.ops.asp.att.net 1058314975 66.31.71.243 (Wed, 16 Jul 2003 00:22:55 GMT) NNTP-Posting-Date: Wed, 16 Jul 2003 00:22:55 GMT Organization: Comcast Online Date: Wed, 16 Jul 2003 00:22:55 GMT Xref: archiver1.google.com comp.lang.ada:40315 Date: 2003-07-16T00:22:55+00:00 List-Id: Randy Brukardt wrote: > I've toyed with adding a mode to Janus/Ada to allow in out parameters on > functions, but I haven't seen a compelling use for it (the most valuable > uses would be in Claw, but that has to work with standard Ada). And AFAIK, GNAT still supports the "value returning procedures pragmas from DEC Ada. But the rule still won't change, and the reason is not just "politics." This is just one area of the Ada programming culture that seems to rub foreigners (to Ada) the wrong way. If you are used to Ada, the current Ada idioms for the few cases that seem to some people to be problems are natural to you. Since I have done a lot of work on random number generators, the Ada idiom now seems natural to me: function Random(Gen: in Generator) return ... Local: Generator; for Local'Address use Gen'Address; begin ... end Random; Unlike RBKD, I did strongly argue for an in out parameter mode for functions in Ada 9X. But in doing so I knew that it would be misused more than it would be correctly used. By now with good implementations of Unbounded_String, most of the real needs for functions with in out parameters have gone away. You can always declare a procedure with an out parameter of Unbounded_String. So if the question is reraised I will vote against it. And I will also vote in favor of a generic that provides the equivalent of Unbounded_String for all array types, including multidimensional array types. -- Robert I. Eachus �In an ally, considerations of house, clan, planet, race are insignificant beside two prime questions, which are: 1. Can he shoot? 2. Will he aim at your enemy?� -- from the Laiden novels by Sharon Lee and Steve Miller.