Const sucks
Nathan Reed
nathaniel.reed at gmail.com
Tue Sep 11 10:54:45 PDT 2007
Janice Caron wrote:
> I want to be able to *express the idea* that the value I am declaring
> shall never change. To my mind:
>
> const int NUM_DAYS_IN_WEEK = 7;
>
> successfully expresses that idea, and frankly, I whether or not
> NUM_DAYS_IN_WEEK consumes memory should not be my call. That is an
> implementation detail, and should be the compiler's problem, not mine.
Agree.
Thanks,
Nathan Reed
More information about the Digitalmars-d
mailing list