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: 'constant functions' and access constant params (was Re: Array of Variant Records Question...) Date: 1999/09/22 Message-ID: <7s9kvn$af0@dfw-ixnews17.ix.netcom.com>#1/1 X-Deja-AN: 528097682 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> <7reg02$t83@dfw-ixnews6.ix.netcom.com> <37DE8D09.C863CBC9@rational.com> <7roohh$s6r@dfw-ixnews7.ix.netcom.com> <37e01168@news1.prserv.net> <7rp86o$c6h@dfw-ixnews3.ix.netcom.com> <37E18CC6.C8D431B@rational.com> <7rs8bn$s6@dfw-ixnews4.ix.netcom.com> Organization: Netcom X-NETCOM-Date: Tue Sep 21 11:12:39 PM CDT 1999 Newsgroups: comp.lang.ada Date: 1999-09-21T23:12:39-05:00 List-Id: In article , Robert A Duff wrote: >Richard D Riehle writes: > >> Extremism in a defense against side-effects is no vice. :-) > >I see the smily, but: > >IMHO a language design should not attempt to prevent "evil". Instead, >it should help the programmer mark the dangerous or questionable things >clearly. Eg, Unchecked_Conversion isn't evil ... I agree that unchecked_conversion isn't evil. Nor are the other unchecked services provided by the language. In fact, the very way they are provided supports the notion of Ada's default of "safe" while permitting a designer to relax that default when necessary. The default access parameters is "unsafe". I am simply suggesting that a constant designation in the parameter list would ensure a safer implementation, and it would tip off the client of a function that the parameter in would never be altered in any way. Richard