Thread overview
Differences between invariant and immutable?
May 19, 2009
Jeremie Pelletier
May 20, 2009
Stewart Gordon
May 19, 2009
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.

Jeremie
May 19, 2009
On Mon, May 18, 2009 at 11:02 PM, Jeremie Pelletier <jeremiep@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.
May 20, 2009
Jeremie Pelletier wrote:
<snip>
> 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.

Known issue.
http://d.puremagic.com/issues/show_bug.cgi?id=2572

Stewart.