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,bd40601768eaf8fd X-Google-Attributes: gid103376,public From: Richard D Riehle Subject: Re: Array of Variant Records Question... Date: 1999/09/11 Message-ID: <7reg02$t83@dfw-ixnews6.ix.netcom.com>#1/1 X-Deja-AN: 523881957 References: <7r5vh3$imu1@svlss.lmms.lmco.com> <37d6a45c@news1.prserv.net> <37d6ccb6@news1.prserv.net> <7r77i8$i08$1@nnrp1.deja.com> <37d7c116@news1.prserv.net> <7r8t21$ov5$1@nnrp1.deja.com> <37d822a1@news1.prserv.net> Organization: Netcom X-NETCOM-Date: Sat Sep 11 4:01:54 PM CDT 1999 X-Inktomi-Trace: sji-ca-cache 937083691 18282 209.109.233.39 (11 Sep 1999 21:01:31 GMT) Newsgroups: comp.lang.ada Date: 1999-09-11T16:01:54-05:00 List-Id: In article <37d822a1@news1.prserv.net>, "Matthew Heaney" wrote: >To be able to modify an in-mode subprogram parameter. Essentially, what ACT >did to implement the function Random in GNAT. > >(The locution "cast away const" comes from C++.) One of things I do not like about the current C++ standard is the kludge that permits "cast away const". Would not want this in Ada. However, I do like the stronger model for const that C++ provides and would like to see constant functions in the next version of Ada. For example, constant function (X : access Item) return T: or even function (X : constant Item) return T; where X, in both cases, can be an access to object or access type for a function and disallows any side-effects on the components of the parameter. It seems to me this would be a simple fix to const'ness and correspond to the current behavior of a protected function. Richard Riehle http://www.adaworks.com