is my code to get CTFE instantiated object valid D ?

Era Scarecrow via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri May 27 14:50:40 PDT 2016


On Friday, 27 May 2016 at 20:20:36 UTC, chmike wrote:
> The public interface of Category is designed so that the 
> object's state can't be modified and thus remains immutable.

  Then... why cast away immutable?

  I suppose there's always a core set of variables that are what 
the object actually considers for it's constness, while there's 
other extra ones for convenience (say lookup hash tables, memoize 
and the like) which assist but their presence or lack thereof 
only affects speed rather than function...


More information about the Digitalmars-d-learn mailing list