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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a070c512f8bdd68e X-Google-Attributes: gid103376,public From: Tucker Taft Subject: Re: Access Types Date: 1999/07/23 Message-ID: <3798EC3A.3B0C3E20@averstar.com>#1/1 X-Deja-AN: 504562226 Content-Transfer-Encoding: 7bit Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.burl.averstar.com References: <7mkgqq$elo$1@dailyplanet.wam.umd.edu> <932674911.9494.0.nnrp-01.c2de848f@news.demon.co.uk> Content-Type: text/plain; charset=us-ascii Organization: AverStar (formerly Intermetrics) Burlington, MA USA Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-07-23T00:00:00+00:00 List-Id: 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