Eyyub <[email protected]> wrote:

I recently upgraded to the D 2, and i would like understand for which reason they are the immutable keyword !

immutable means 'this data cannot change'. It is different from const in
that the latter means 'I cannot change this data (but someone else may
change it from under my feet)'.

It is added for simplification of sharing (no locking required), and to
a certain extent to allow for better optimization and functional
programming.

--
Simen

Reply via email to