digitalmars.D - Re: Const sucks
- Bruce Adams <tortoise_74 yeah.who.co.uk> Sep 11 2007
- Charles <charles jwavro.com> Sep 11 2007
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.
Sep 11 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.
Sep 11 2007