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 14:06:18 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!diablo.theplanet.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Ada to 'C' parameter passing problem Date: 20 Feb 2003 22:05:07 +0000 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: <1ec946d1.0302191836.743eab91@posting.google.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1045778777 11253 62.49.19.209 (20 Feb 2003 22:06:17 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Thu, 20 Feb 2003 22:06:17 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: archiver1.google.com comp.lang.ada:34311 Date: 2003-02-20T22:05:07+00:00 List-Id: rod.chapman@praxis-cs.co.uk (Rod Chapman) writes: > 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! I recall Robert Dewar saying that he thought that restricting functions to "in" (or access) parameters was a Bad Idea -- Ada is a programming language, not a mathematical abstraction, and there is nothing in Ada to stop a function modifying global state. (Praise be, say I). But Robert got outvoted during the Ada 9X process. There would be nothing to stop SPARK requiring functions to have only "in" parameters -- after all you disallow access parameters & modifying global state!