comp.lang.ada
 help / color / mirror / Atom feed
From: csampson@cod.nosc.mil (Charles H. Sampson)
Subject: Re: Coding Standards & GOTO
Date: 1997/09/26
Date: 1997-09-26T00:00:00+00:00	[thread overview]
Message-ID: <1997Sep26.173917.5001@nosc.mil> (raw)
In-Reply-To: mheaney-ya023680002209971952370001@news.ni.net


In article <mheaney-ya023680002209971952370001@news.ni.net>,
Matthew Heaney <mheaney@ni.net> wrote (among other things):
>
>And what's wrong with objects in the spec?  Have you read Ada.Text_IO
>lately?  Again, this calls for guidelines for when to declare an object in
>the spec, and when not to.  For example, when implementing a subsystem,
>then an object shared among packages in the same subsystem can be declared
>in the spec of a private package.
>
>Also, a well-known object, used throughout the system, can be declared in a
>spec:
>
>package Targets.Objects is
>
>   type Target_Array is array (Positive range 1 .. 20) of Target;
>
>   The_Targets : Target_Array;
>
>end;
>
>What's wrong with that?

     While I agree your basic premise that absolute rules are never 
correct (including this one), what's wrong with this example is that it 
locks anybody who uses this package into the design decision that tar-
gets will be stored in an array.  Change that to a linked list and
you've got a major code modification job.

     This is exactly what Parnas taught us not to do in 1972.  While I 
share your aversion to absolute rules, I almost never have objects in
the visible part of package specs.  The exceptions seem to almost al-
ways be Boolean.

				Charlie
--
******

    If my user name appears as "csampson", remove the 'c' to get my
correct e-mail address.




  parent reply	other threads:[~1997-09-26  0:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-17  0:00 Is there an ADA analogue to the C++ continue statement? Heath, Terry D.
1997-09-18  0:00 ` Robert Dewar
1997-09-18  0:00 ` Pascal Obry
1997-09-18  0:00   ` Robert A Duff
1997-09-18  0:00   ` Samuel Tardieu
1997-09-19  0:00   ` Robert Dewar
     [not found]     ` <3422F037.41CA@lmco.com>
1997-09-20  0:00       ` dan13
1997-09-21  0:00         ` Robert Dewar
     [not found]           ` <3426B51E.7296@lmco.com>
1997-09-22  0:00             ` Coding Standards & GOTO Matthew Heaney
1997-09-23  0:00               ` Mark A Biggar
1997-09-24  0:00                 ` W. Wesley Groleau x4923
1997-09-24  0:00                 ` Shmuel (Seymour J.) Metz
1997-09-24  0:00               ` Aaron Quantz
1997-09-26  0:00               ` Charles H. Sampson [this message]
1997-09-23  0:00             ` Charles Rose
1997-09-24  0:00               ` Matthew Heaney
1997-09-25  0:00                 ` Shmuel (Seymour J.) Metz
1997-09-23  0:00             ` Coding Standards W. Wesley Groleau x4923
1997-09-22  0:00         ` Is there an ADA analogue to the C++ continue statement? Richard D Riehle
1997-09-23  0:00         ` GOTO considered Satanic (was: Is there an ADA analogue to the C++ continue statement?) Adam Beneschan
1997-09-24  0:00           ` Brian Rogoff
1997-09-25  0:00             ` Larry Kilgallen
1997-09-26  0:00             ` Matthew Heaney
1997-09-26  0:00               ` Brian Rogoff
1997-10-07  0:00               ` Robert I. Eachus
1997-09-24  0:00           ` W. Wesley Groleau x4923
1997-09-25  0:00           ` Alan Brain
1997-09-25  0:00             ` Shmuel (Seymour J.) Metz
1997-09-22  0:00     ` Is there an ADA analogue to the C++ continue statement? Richard A. O'Keefe
1997-09-29  0:00     ` John G. Volan
replies disabled

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