Poll: a nonstate keyword

terranium spam at here.lot
Mon Jun 2 09:02:02 PDT 2008


Fawzi Mohamed Wrote:

> Basically it is an unsafe hole that allows to implement nice an useful 
> stuff (suspended values(lazy eval & cache), dataflow variables, 
> memoization, performace/statistical information), but can break 
> invariant and introduce subtle bugs.
>
Jeffrey Richter in "CLR via C#" proposes to implement immutability as a class design rather than compiler-checked const. Transitive const is good for POD, but for classes... it seems to have high complexity and unpredictable behavior in complex cases, and it's nearly unneeded in simple cases.



More information about the Digitalmars-d mailing list