comp.lang.ada
 help / color / mirror / Atom feed
* [Q] To initialise or not.
@ 1996-04-25  0:00 JP Thornley
  1996-04-26  0:00 ` Robert I. Eachus
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: JP Thornley @ 1996-04-25  0:00 UTC (permalink / raw)



We are currently looking at revision of the Ada coding standards 
(probably based closely on the Ada Quality and Style Guidelines as 
advised elsewhere).

However the issue of whether or not to require all scalar objects to be 
initialised has generated a substantial discussion without yet reaching 
a clear conclusion.  The Ada Quality and Style Guidelines are silent on 
this issue, so I would be interested in what other Ada users have found 
and what recommendations they would make.

Briefly, the argument for initialising everything is predictability of 
operation (by avoiding a read of an uninitialised value).  The 
argument against is that giving everything an initial value obscures the 
fact that some objects *should* be initialised (and the initial value 
has some significance) and other initialisations are there simply to 
follow the rule (and the value has no particular significance).

(Note that some projects will be using Ada 83 for some time yet, so 
pragma Normalize_Scalars isn't an option).

Thanks in advance.

Phil Thornley

-- 
------------------------------------------------------------------------
| JP Thornley    EMail jpt@diphi.demon.co.uk                           |
------------------------------------------------------------------------





^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~1996-05-02  0:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-04-25  0:00 [Q] To initialise or not JP Thornley
1996-04-26  0:00 ` Robert I. Eachus
1996-04-26  0:00 ` Ken Garlington
1996-04-26  0:00   ` Robert A Duff
1996-04-27  0:00   ` Robert Dewar
1996-04-27  0:00     ` Robert A Duff
1996-04-26  0:00 ` Theodore E. Dennison
1996-04-26  0:00   ` Robert A Duff
1996-04-27  0:00     ` Thorsten Behrens
1996-04-28  0:00       ` Robert Dewar
1996-04-30  0:00       ` mjp
1996-05-02  0:00       ` Bob Gilbert
1996-04-26  0:00 ` Ken Garlington
1996-04-27  0:00 ` Robert Dewar

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