Const:
Cannot be changed by the const reference to the data, but can be changed by another reference.
int i = 8;
const(int*) ip = &i;
i = 7; //OK, but *ip == 7
*ip = 9; //error
Immutable:
Cannot be changed and no other references can change it.
immutable int i = 8; //can never be changed
immutable(int*) ip = &i; //pointer and contents can't be changed
auto dim = dimension!"Test"(...); //mutable
auto cube = denseCube!double(dim);
auto cubeDim = cube.getDimension!"Test"; //immutable
auto iDim = dim.assumeDimUnique;
auto iDims = enforceUnique(dim1, dim2).expand;
auto cube = denseCube!double(...); //mutable
const cCube = denseCube!double(...);
auto iCube = cube.assumeCubeUnique;
auto range = cube[]; //segfault!
auto range = iCube[]; //The world is good!