www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Differences between invariant and immutable?

reply Jeremie Pelletier <jeremiep gmail.com> writes:
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 18 2009
next sibling parent Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
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 18 2009
prev sibling parent Stewart Gordon <smjg_1998 yahoo.com> writes:
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.
May 19 2009