D const design rationale

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Sun Jun 24 09:54:21 PDT 2007


Kristian Kilpi wrote:
> What I would want is a way to tell the compiler that the 
> data will not be changed
> *during the execution* of a function.

scope invariant.
"invariant" means the data referenced won't be changed, "scope" means 
the reference will be invalid after the function exits (and thus the 
"invariantness" no longer needs to be guaranteed from that point on 
since any access to the data is an error anyway).



More information about the Digitalmars-d mailing list