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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8c87bf30faa2b6b,start X-Google-Attributes: gid103376,public From: JP Thornley Subject: [Q] To initialise or not. Date: 1996/04/25 Message-ID: <484274071wnr@diphi.demon.co.uk>#1/1 X-Deja-AN: 151494989 x-mail2news-path: relay-4.mail.demon.net!post.demon.co.uk!diphi.demon.co.uk x-nntp-posting-host: diphi.demon.co.uk organization: None reply-to: jpt@diphi.demon.co.uk newsgroups: comp.lang.ada Date: 1996-04-25T00:00:00+00:00 List-Id: 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 | ------------------------------------------------------------------------