From mboxrd@z Thu Jan 1 00:00:00 1970 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R.Carter" Newsgroups: comp.lang.ada Subject: Re: Ichbiah 2022 compiler mode Date: Sat, 21 Dec 2024 10:50:41 +0100 Organization: A noiseless patient Spider Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sat, 21 Dec 2024 10:50:41 +0100 (CET) Injection-Info: dont-email.me; posting-host="f53a506f3a9020cc3e60183f41615ba7"; logging-data="4177252"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/nEJRHpvuFiW5oczW0JMpboneg8TfHfOU=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:LFatAnWqKQWukAf1BgxTUo7AWa8= Content-Language: en-US In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:66498 List-Id: On 2024-12-21 09:14, Randy Brukardt wrote: > > "One more keyword" is irrelevant in terms of creating code, the only > question is whether it hurts readability. More keywords = fewer words that can be used as identifiers so more keywords makes writing code a little bit harder than fewer keywords. > But how many of them *have* to be variables vs. the number that just are > because it is easier? I know I have a number of the latter. I put a lot of effort into making sure that all constants are so declared, because I have the rule that (with certain exceptions) no non-local variables may be referenced from subprograms, but constants may be referenced from anywhere. However, I sometimes have constants that cannot be initialized with a single expression, resulting in C : T; -- Constant after initialization Once C has been initialized, I treat it as a constant. Would your approach allow the compiler to know that C is really a constant? -- Jeff Carter “Anyone who cannot cope with mathematics is not fully human.” The Notebooks of Lazarus Long 214