comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Two more AQS-95 questions
Date: 1998/02/03
Date: 1998-02-03T00:00:00+00:00	[thread overview]
Message-ID: <dewar.886511060@merv> (raw)
In-Reply-To: 34D60055.1FFF@gc057.fw.hac.com


Wes says


<<1)  In 3.2.6, why "use a constant ... when the value must be static"
    but "named numbers, ... whenever possible."  Isn't a named number
    static?  Is there an advantage to a (typed) constant for
    "staticness" ?
>>


This is totally incorrect advice. Not just harmless, but actively harmful.

Named numbers are untyped. Their use is only appropriate if from a
conceptual point of view, the constant value *is* untyped, for example

  pi : constant := 3.14....

is OK, because conceptually pi is an untyped pure number.

If a constant is typed, then it is definitely MUCH more desirable to
type the constant, so that you get proper type checking on its use.





  reply	other threads:[~1998-02-03  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-02  0:00 Two more AQS-95 questions Wes Groleau
1998-02-03  0:00 ` Robert Dewar [this message]
1998-02-05  0:00 ` K. E. Garlington
1998-02-05  0:00   ` Robert Dewar
replies disabled

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