Is all this Invarient **** er... stuff, premature optimisation?

Walter Bright newshound1 at digitalmars.com
Mon Apr 28 20:28:35 PDT 2008


Me Here wrote:
> Just as the answer to the occasional hit-and-run death is not banning 
> cars, so fixing unintentional aliasing in threaded applications does not 
> lie in forcing all character arrays to be immutable.

D does not force all character arrays to be immutable. You can use 
mutable ones by declaring them as:

	char[]

Reference types all come in 3 flavors: mutable, read-only-view-of (i.e. 
const) and invariant.



More information about the Digitalmars-d mailing list