invariant()

Michel Fortin michel.fortin at michelf.com
Sun Apr 12 17:44:21 PDT 2009


On 2009-04-12 19:08:08 -0400, Stewart Gordon <smjg_1998 at yahoo.com> said:

> Michel Fortin wrote:
> <snip>
>> Now that the use of the invariant keyword in D2 has returned to its 
>> single original meaning of class invariant,
> 
> Where do you get that idea from???

D 2.020's changelog:

- immutable now is implemented.


I though this meant that invariant was replaced by immutable as a type 
modifier. Apparently, it was not: invariant can still be used as a 
synonym to immutable. This also makes:

	(invariant int).stringof == "immutable(int)"

So I guess I should change my initial question: is this use of 
invariant going to be kept indefinitely?

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Digitalmars-d mailing list