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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3f92589f15917eec X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!p12g2000vbo.googlegroups.com!not-for-mail From: Martin Newsgroups: comp.lang.ada Subject: Re: Simple Warnings Needs Date: Wed, 23 Feb 2011 13:55:54 -0800 (PST) Organization: http://groups.google.com Message-ID: <8b826007-6846-4477-a6e0-91ad08b32bc7@p12g2000vbo.googlegroups.com> References: <8aaf3582-0cc1-4c5f-ab85-eeb7ba569d9e@glegroupsg2000goo.googlegroups.com> NNTP-Posting-Host: 86.154.212.189 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1298498258 32417 127.0.0.1 (23 Feb 2011 21:57:38 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 23 Feb 2011 21:57:38 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p12g2000vbo.googlegroups.com; posting-host=86.154.212.189; posting-account=g4n69woAAACHKbpceNrvOhHWViIbdQ9G User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b11) Gecko/20100101 Firefox/4.0b11,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:18538 Date: 2011-02-23T13:55:54-08:00 List-Id: On Feb 23, 6:52=A0pm, Rego wrote: > =A0** "-gnatwk" (Variables that could be constants) A rationale behind this one is that by explicitly declaring items as constants you can prevent _accidental_ modification. It's also a nice visual queue to a reader that the value is deliberately set once and once only, or they are left to wonder why a variable is defined and set once but never again - is that a bug? I seem to remember an article by Dewar explaining why constants can rarely be optimized but I can't put my finger on it at the moment... HTH -- Martin