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/27 Message-ID: <7socka$6u4@dfw-ixnews19.ix.netcom.com>#1/1 X-Deja-AN: 529964454 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> <37e2e58c@news1.prserv.net> <7s9nd0$cbe@dfw-ixnews17.ix.netcom.com> <37e8e067@news1.prserv.net> <7sas3p$bfa@dfw-ixnews3.ix.netcom.com> <7sc6b6$c6m$1@nnrp1.deja.com> Organization: Netcom X-NETCOM-Date: Mon Sep 27 1:22:02 PM CDT 1999 X-Inktomi-Trace: sji-ca-cache 938456503 22139 209.109.232.38 (27 Sep 1999 18:21:43 GMT) Newsgroups: comp.lang.ada Date: 1999-09-27T13:22:02-05:00 List-Id: In article <7sc6b6$c6m$1@nnrp1.deja.com>, Robert Dewar wrote: >The answer is that without comments, the caller has not the >foggiest idea. Specifications in Ada give only the bearest >structural details on how to call a subprogram, they do not >give any hint as to what the subprogram is supposed to do! Exactly, Robert. In the absence of assertions that can be checked by the compiler, comments are the only recourse. And you and I both agree about the problems of compiler-checked assertions. An assertion can be more wrong than the program itself. >So let's not get too excercised about what is and what is not >in the actual syntax, since we know that the most critical part >in any case will be in the comments saying what is to be done. In the words of Ophelia, "Tis true, 'tis pity. 'Tis pity, 'tis true." * Of course, Robert, there is not intention in quoting this to suggest any sense of madness here. :-) >Richard, if you think the client and the implementor will ignore >the comments you are completely lost in any case, since these >comments are the *only* clue as to the functionality to be used >or implemented. Robert, one reason why I sometimes still look at the internal implemention of a subprogram is my distrust of comments over the life of a contract. The comment may introduce me to what the subprogram does, but rarely tells me what it does not do. When a contract is new, the comments are usually pretty reliable. As the program ages and is subjected to an increased level of modification, "all bets are off." So it is, Robert, that I am so often, as you say, "completely lost." Fortunately, well-designed Ada software will export services that do only one thing and are, as you so often emphasize, more readable than writeable. When looking at a C++ program, I am often "completely lost" because there is so little hope of unraveling the meaning of little modifications made to a program over its lifetime. I certainly cannot rely on the comments when using heavily maintained C++ code. Richard Riehle http://www.adaworks.com * My copy of Hamlet is not immediately handy, but I think I am pretty close to the original text. Richard