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,31c63f07e48d5471 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-20 01:43:46 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!tar-alcarin.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: Ada to 'C' parameter passing problem Date: Thu, 20 Feb 2003 10:43:44 +0100 Message-ID: References: <1ec946d1.0302191836.743eab91@posting.google.com> NNTP-Posting-Host: tar-alcarin.cbb-automation.de (212.79.194.111) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: fu-berlin.de 1045734224 40364583 212.79.194.111 (16 [77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:34263 Date: 2003-02-20T10:43:44+01:00 List-Id: On 20 Feb 2003 01:18:34 -0800, rod.chapman@praxis-cs.co.uk (Rod Chapman) wrote: >mheaney@on2.com (Matthew Heaney) wrote in message news:> That Ada doesn't allow you to specify inout mode for function >> parameters is a deficiency of Ada... > >Wow! This reflects somewhat of a gulf between our respective >views of language design! (Don't get me wrong, neither position >is necessarily right or wrong, just different...) > >At the SPARK end of the spectrum functions calls are expressions >which return a value and never have a side-effect. Procedure >calls are statements which have side-effects - A rather >significant _semantic_ difference! > >If you do prefer the ability to allow a function to modify its >parameters, then it should at least be good enough to confess >this to the outside-world as part of its specifiction. The current >discussion for Ada0Y in AI231 (extending anonymous access >parameters) is welcome here, especially from a static-analysis >point of view. [ Long awaited thread "inout parameters for functions" is again here (:-)) ] "To return a value via the result parameter" /= "To have no side effects other than on the out and inout parameters" To mix the above two is definitely a deficiency. To involve pointers as a work-around for consequences of that deficiency is worse than just a deficiency. --- Regards, Dmitry Kazakov www.dmitry-kazakov.de