Meaning of const variables
Mike Parker via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Jun 21 00:20:26 PDT 2016
> behavior is identical. And really, if you never need to take
> the address of the variable, then a manifest constant using
> enum would be more appropriate.
>
Actually, I should say it *may* be more appropriate. Definitely
only when the initializer is known at compile time. There are
cases when you initialize a local immutable variable with a
runtime value.
More information about the Digitalmars-d-learn
mailing list