Const sucks
Charles
charles at jwavro.com
Tue Sep 11 14:49:29 PDT 2007
Agreed!
Bruce Adams Wrote:
> Nathan Reed Wrote:
>
> > 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
>
> Already agreed on another thread but worth every extra vote.
More information about the Digitalmars-d
mailing list