comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Ada to 'C' parameter passing problem
Date: 20 Feb 2003 22:05:07 +0000
Date: 2003-02-20T22:05:07+00:00	[thread overview]
Message-ID: <x7vr8a2k3qk.fsf@smaug.pushface.org> (raw)
In-Reply-To: cf2c6063.0302200118.63a7ea1d@posting.google.com

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!



  parent reply	other threads:[~2003-02-20 22:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-18 15:39 Ada to 'C' parameter passing problem Patrick
2003-02-18 16:47 ` Jeffrey Carter
2003-02-18 19:50 ` Rod Chapman
2003-02-20  2:36   ` Matthew Heaney
2003-02-20  9:18     ` Rod Chapman
2003-02-20  9:43       ` Dmitry A. Kazakov
2003-02-20 22:05       ` Simon Wright [this message]
2003-02-21  9:53         ` Stuart Palin
2003-02-21 17:39           ` Jeffrey Carter
2003-02-21 18:12           ` Warren W. Gay VE3WWG
2003-02-21 20:25           ` Randy Brukardt
2003-02-24 23:53       ` Matthew Heaney
2003-02-25 17:21         ` Rod Chapman
  -- strict thread matches above, loose matches on Subject: below --
2003-02-21 16:52 Lionel.DRAGHI
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox