Re: Ichbiah 2022 compiler mode

Liste des GroupesRevenir à cl ada 
Sujet : Re: Ichbiah 2022 compiler mode
De : randy (at) *nospam* rrsoftware.com (Randy Brukardt)
Groupes : comp.lang.ada
Date : 24. Dec 2024, 02:00:32
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vkd13i$1fk3i$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Microsoft Outlook Express 6.00.2900.5931
"Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not> wrote in message
news:vk631h$3vfb4$1@dont-email.me...
...
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.

Precisely. The idea is to encourage use of constants by eliminating the
unnatural advantage to writing uninitialized variables. If everything is
equally easy/hard to write, then one is more likely to make the best choice
for the program.

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?

Not with the approach I was envisioning. Of course, Ada 2022 and beyond
already make it possible to initialize a lot more objects (especially with
the introduction of container aggregates), so hopefully it will be less
necessary to write things like your example.

                           Randy.

--
Jeff Carter
"Anyone who cannot cope with mathematics
is not fully human."
The Notebooks of Lazarus Long
214



Date Sujet#  Auteur
5 Sep 24 * Ichbiah 2022 compiler mode44Kevin Chadwick
5 Sep 24 +* Re: Ichbiah 2022 compiler mode6Jeffrey R.Carter
5 Sep 24 i+* Re: Ichbiah 2022 compiler mode2Bill Findlay
5 Sep 24 ii`- Re: Ichbiah 2022 compiler mode1Jeffrey R.Carter
5 Sep 24 i+- Re: Ichbiah 2022 compiler mode1Kevin Chadwick
5 Sep 24 i`* Re: Ichbiah 2022 compiler mode2Kevin Chadwick
5 Sep 24 i `- Re: Ichbiah 2022 compiler mode1Jeffrey R.Carter
6 Sep 24 +* Re: Ichbiah 2022 compiler mode35Randy Brukardt
6 Sep 24 i+* Re: Ichbiah 2022 compiler mode5Lawrence D'Oliveiro
12 Sep 24 ii`* Re: Ichbiah 2022 compiler mode4Randy Brukardt
12 Sep 24 ii `* Re: Ichbiah 2022 compiler mode3Lawrence D'Oliveiro
14 Sep 24 ii  `* Re: Ichbiah 2022 compiler mode2Randy Brukardt
14 Sep 24 ii   `- Re: Ichbiah 2022 compiler mode1Lawrence D'Oliveiro
6 Sep 24 i+* Re: Ichbiah 2022 compiler mode15Simon Wright
7 Sep 24 ii`* Re: Ichbiah 2022 compiler mode14Niklas Holsti
7 Sep 24 ii +- Re: Ichbiah 2022 compiler mode1Nioclás Pól Caileán de Ghloucester
12 Sep 24 ii `* Re: Ichbiah 2022 compiler mode12Randy Brukardt
12 Sep 24 ii  +* Re: Ichbiah 2022 compiler mode5Niklas Holsti
12 Sep 24 ii  i+- Re: Ichbiah 2022 compiler mode1Dmitry A. Kazakov
12 Sep 24 ii  i`* Re: Ichbiah 2022 compiler mode3Kevin Chadwick
12 Sep 24 ii  i +- Re: Ichbiah 2022 compiler mode1Niklas Holsti
13 Sep 24 ii  i `- Re: Ichbiah 2022 compiler mode1Nioclás Pól Caileán de Ghloucester
12 Sep 24 ii  `* Re: Ichbiah 2022 compiler mode6J-P. Rosen
12 Sep 24 ii   `* Re: Ichbiah 2022 compiler mode5Niklas Holsti
14 Sep 24 ii    `* Re: Ichbiah 2022 compiler mode4Randy Brukardt
14 Sep 24 ii     +- Re: Ichbiah 2022 compiler mode1Dmitry A. Kazakov
14 Sep 24 ii     +- Re: Ichbiah 2022 compiler mode1Lawrence D'Oliveiro
14 Sep 24 ii     `- Re: Ichbiah 2022 compiler mode1Niklas Holsti
21 Dec 24 i+* Re: Ichbiah 2022 compiler mode12Lioneldraghi
21 Dec 24 ii`* Re: Ichbiah 2022 compiler mode11Randy Brukardt
21 Dec 24 ii +* Re: Ichbiah 2022 compiler mode2Jeffrey R.Carter
24 Dec 24 ii i`- Re: Ichbiah 2022 compiler mode1Randy Brukardt
21 Dec 24 ii +* Re: Ichbiah 2022 compiler mode6G.B.
21 Dec 24 ii i+- Re: Ichbiah 2022 compiler mode1Chris Townley
22 Dec 24 ii i+* Re: Ichbiah 2022 compiler mode3Simon Wright
22 Dec 24 ii ii`* Re: Ichbiah 2022 compiler mode2G.B.
23 Dec 24 ii ii `- Re: Ichbiah 2022 compiler mode1Simon Wright
24 Dec 24 ii i`- Re: Ichbiah 2022 compiler mode1Randy Brukardt
21 Dec 24 ii `* Re: Ichbiah 2022 compiler mode2Keith Thompson
22 Dec 24 ii  `- Re: Ichbiah 2022 compiler mode1Pascal Obry
21 Dec 24 i`* Re: Ichbiah 2022 compiler mode2Lioneldraghi
21 Dec 24 i `- Re: Ichbiah 2022 compiler mode1Randy Brukardt
6 Sep 24 `* Re: Ichbiah 2022 compiler mode2Jeffrey R.Carter
6 Sep 24  `- Re: Ichbiah 2022 compiler mode1Nioclás Pól Caileán de Ghloucester

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal