comp.lang.ada
 help / color / mirror / Atom feed
From: Richard D Riehle <laoXhai@ix.netcom.com>
Subject: Re: 'constant functions' and access constant params (was Re: Array of Variant Records Question...)
Date: 1999/09/27
Date: 1999-09-27T13:22:02-05:00	[thread overview]
Message-ID: <7socka$6u4@dfw-ixnews19.ix.netcom.com> (raw)
In-Reply-To: 7sc6b6$c6m$1@nnrp1.deja.com

In article <7sc6b6$c6m$1@nnrp1.deja.com>,
	Robert Dewar <robert_dewar@my-deja.com> 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




  reply	other threads:[~1999-09-27  0:00 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-08  0:00 Array of Variant Records Question Bruce Detter
1999-09-08  0:00 ` Matthew Heaney
1999-09-08  0:00   ` Mike Silva
1999-09-08  0:00     ` Matthew Heaney
1999-09-09  0:00       ` Robert Dewar
1999-09-09  0:00         ` Matthew Heaney
1999-09-09  0:00           ` Robert Dewar
1999-09-09  0:00             ` Matthew Heaney
1999-09-10  0:00               ` Robert Dewar
1999-09-10  0:00                 ` Mark Lundquist
1999-09-10  0:00                   ` Matthew Heaney
1999-09-11  0:00                     ` Jean-Pierre Rosen
1999-09-14  0:00                     ` "cast away const" (was Re: Array of Variant Records Question...) Mark Lundquist
     [not found]                     ` <wccd7viiv59.fsf@world.std.com>
     [not found]                       ` <7rrmqd$l89@drn.newsguy.com>
     [not found]                         ` <wcciu59n2uf.fsf@world.std.com>
1999-09-22  0:00                           ` Array of Variant Records Question Robert I. Eachus
1999-09-23  0:00                             ` Robert Dewar
1999-09-23  0:00                               ` Robert I. Eachus
1999-09-22  0:00                       ` Robert I. Eachus
1999-09-10  0:00               ` Mark Lundquist
1999-09-10  0:00                 ` Matthew Heaney
1999-09-11  0:00                 ` Robert Dewar
1999-09-11  0:00               ` Richard D Riehle
1999-09-13  0:00                 ` Hyman Rosen
1999-09-14  0:00                 ` Mark Lundquist
     [not found]                   ` <7roohh$s6r@dfw-ixnews7.ix.netcom.com>
     [not found]                     ` <37e01168@news1.prserv.net>
     [not found]                       ` <7rp86o$c6h@dfw-ixnews3.ix.netcom.com>
     [not found]                         ` <37E18CC6.C8D431B@rational.com>
     [not found]                           ` <7rs8bn$s6@dfw-ixnews4.ix.netcom.com>
     [not found]                             ` <wccemfxn15s.fsf@world.std.com>
1999-09-22  0:00                               ` 'constant functions' and access constant params (was Re: Array of Variant Records Question...) Richard D Riehle
     [not found]                             ` <37e2e58c@news1.prserv.net>
1999-09-22  0:00                               ` Richard D Riehle
1999-09-22  0:00                                 ` Matthew Heaney
1999-09-22  0:00                                   ` Richard D Riehle
1999-09-22  0:00                                     ` Matthew Heaney
1999-09-22  0:00                                     ` Matthew Heaney
1999-09-23  0:00                                       ` Vincent Marciante
1999-09-23  0:00                                         ` Matthew Heaney
1999-09-24  0:00                                       ` Robert A Duff
1999-09-25  0:00                                         ` Matthew Heaney
1999-09-27  0:00                                       ` Richard D Riehle
1999-09-27  0:00                                       ` Richard D Riehle
1999-09-27  0:00                                         ` David Kristola
1999-09-23  0:00                                     ` Robert Dewar
1999-09-27  0:00                                       ` Richard D Riehle [this message]
1999-09-28  0:00                                         ` Robert Dewar
1999-09-28  0:00                                           ` Richard D Riehle
1999-09-29  0:00                                             ` Robert A Duff
1999-09-29  0:00                                             ` Robert Dewar
1999-09-28  0:00                                         ` Robert Dewar
1999-09-28  0:00                                           ` "Competence" (was: 'constant functions' and access constant params) Ted Dennison
1999-09-28  0:00                                             ` Robert Dewar
1999-09-22  0:00                                 ` 'constant functions' and access constant params (was Re: Array of Variant Records Question...) Mark Lundquist
1999-09-22  0:00                                   ` Mark Lundquist
1999-09-09  0:00             ` Array of Variant Records Question Brian Rogoff
1999-09-13  0:00               ` Matthew Heaney
1999-09-13  0:00                 ` Brian Rogoff
1999-09-14  0:00                   ` Robert Dewar
1999-09-14  0:00                   ` Robert Dewar
1999-09-14  0:00                     ` Brian Rogoff
1999-09-13  0:00                 ` Robert A Duff
1999-09-13  0:00                   ` Matthew Heaney
1999-09-10  0:00             ` Proposed Ada features (was Re: Array of Variant Records Question...) Mark Lundquist
1999-09-10  0:00               ` Matthew Heaney
1999-09-10  0:00                 ` tmoran
1999-09-09  0:00           ` Array of Variant Records Question Matthew Heaney
1999-09-09  0:00             ` Mark Lundquist
1999-09-09  0:00             ` Robert Dewar
1999-09-09  0:00     ` Nick Roberts
1999-09-09  0:00       ` Robert Dewar
1999-09-09  0:00       ` Tucker Taft
1999-09-10  0:00         ` Nick Roberts
1999-09-08  0:00 ` Ted Dennison
1999-09-08  0:00 ` Martin C. Carlisle
1999-09-08  0:00 ` Thank you Bruce Detter
1999-09-08  0:00   ` Martin C. Carlisle
replies disabled

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