Differences between invariant and immutable?

Jarrett Billingsley jarrett.billingsley at gmail.com
Mon May 18 20:13:29 PDT 2009


On Mon, May 18, 2009 at 11:02 PM, Jeremie Pelletier <jeremiep at gmail.com> wrote:
> I upgraded to 2.0.30 today and noticed the new immutable keyword on the migration to shared page. I knew of the keyword before but older versions of DMD didn't seem to recognize it, so I assumed it meant invariant.
>
> But now I'd like to know what are the specific differences between the two, as I couldn't find any detailed page on the subject.

There are no pages on it.  It's currently an alias for invariant.  The
idea is that invariant will eventually lose its meaning as a type
constructor and just go back to a contract, with immutable taking its
place.



More information about the Digitalmars-d mailing list