comp.lang.ada
 help / color / mirror / Atom feed
From: Tucker Taft <stt@averstar.com>
Subject: Re: Access Types
Date: 1999/07/23
Date: 1999-07-23T00:00:00+00:00	[thread overview]
Message-ID: <3798EC3A.3B0C3E20@averstar.com> (raw)
In-Reply-To: 932674911.9494.0.nnrp-01.c2de848f@news.demon.co.uk

Steve Folly wrote:
> ... But what about subprogram
> access type parameters.
> For example, you can have...
> 
>     function Foo(Bar : access Object) return Boolean;
> 
> Which means the function takes an access to an Object variable.
> The function is free to change the value of the variable that Bar 'points'
> to.
> 
> What seems to be missing is something along the lines of...
> 
>     function Foo(Bar : access constant Object) return Boolean;
> 
> Which would imply that the function cannot change the variable the Bar
> points to.
> 
> Why is this not included in the language definition. 

Because it is largely redundant with "Bar : in Object".  If you
don't intend to update the pointed-to object, why not just
pass it "in"?

Be that as it may, I would also like to see "access constant" parameters
added in for orthogonality reasons, and because for certain tagged
types, essentially all of the primitive operations are most appropriately
written using access parameters.  This change will probably be included
in the next round of language enhancements, though there are no guarantees.
I would recommend the use of "in" in the interim.


> ... Is there an
> alternative?

"in"

> 
> --
> Regards,
> Steve Folly -  Y2K compliant since 32nd Februark 1998
> http://www.follysplace.demon.co.uk
> donationsto:myaccount@mybank.co.uk

-- 
-Tucker Taft   stt@averstar.com   http://www.averstar.com/~stt/
Technical Director, Distributed IT Solutions  (www.averstar.com/tools)
AverStar (formerly Intermetrics, Inc.)   Burlington, MA  USA




  reply	other threads:[~1999-07-23  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-15  0:00 Access Types Ronald Ayoub
1999-07-21  0:00 ` Robert A Duff
1999-07-22  0:00   ` Steve Folly
1999-07-23  0:00     ` Tucker Taft [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-07-01  0:39 access types Brian May
2007-07-01  1:54 ` Robert A Duff
2007-07-01  7:52   ` Dmitry A. Kazakov
2007-07-01 14:57     ` Robert A Duff
2007-07-01 19:41       ` Dmitry A. Kazakov
2007-07-02  0:12         ` Robert A Duff
2007-07-02  8:06           ` Dmitry A. Kazakov
2007-07-02 15:37       ` Adam Beneschan
1998-05-27  0:00 Access types jsanchor
1998-05-28  0:00 ` Jerry van Dijk
1998-05-29  0:00   ` jsanchor
1998-05-30  0:00     ` Jerry van Dijk
replies disabled

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