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,a00006d3c4735d70 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-29 01:12:40 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!tar-atanamir.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: In-Out Parameters for functions Date: Thu, 29 Jan 2004 10:20:29 +0100 Message-ID: <6fjh109qllmjek7ud2me7k1t40so3ervmk@4ax.com> References: <5ad0dd8a.0401240721.7682f2e1@posting.google.com> <5ad0dd8a.0401280230.5c800894@posting.google.com> <101ggi3sdf56311@corp.supernews.com> NNTP-Posting-Host: tar-atanamir.cbb-automation.de (212.79.194.116) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1075367559 27746186 212.79.194.116 ([77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:5029 Date: 2004-01-29T10:20:29+01:00 List-Id: On Wed, 28 Jan 2004 17:13:10 -0600, "Randy Brukardt" wrote: >"Robert A Duff" wrote in message >news:wccptd3olj2.fsf@shell01.TheWorld.com... >> wojtek@power.com.pl (Wojtek Narczynski) writes: >> >> > > Ada is inconsistent -- as Robert Dewar says, side effects are allowed, >> > > so long as you don't document them on the function spec. >> > >> > Looks to me like the ARG is far from agreement on this subject :-) >> >> That's true. Tucker and I, for example, have had this argument several >> times. I'm in favor of allowing 'in out' parameters on functions in Ada >> (but not SPARK!), and Tucker is against. > >Which goes to show that even bright people can be wrong from time-to-time. >:-) > >This topic is almost a religious war. I'm one of the few who's changed sides >(even though allowing 'in out' on functions would be such a disruptive >change to Janus/Ada that it probably would lead to the abandonment of the >technology), because it is impossible to do good (pointer-less) O-O >programming without it. Would not procedures with return be a minor, non-obtrusive change? I am afraid that allowing IN OUT parameters would be inconsistent with the functions of the protected objects. Provided that the prefix notation creeps Ada, it will be difficult to explain when X.Foo may change X and when not. -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de