immutable storage class?

Robert Fraser fraserofthenight at gmail.com
Thu Mar 12 02:27:14 PDT 2009


Sergey Kovrov wrote:
> From playing with compiler looks like immutable and invariant are practically interchangeable. And typeof reports that invariant is really immutable. I personally like immutable keyword better, but wonder if it is just a change of name or something more?
> 
> -- serg.

 From the newsgroup discussions, it's just a change of name, with the 
exception that only invariant can be used for class invariants:

class Foo {
     invariant() { }
}


More information about the Digitalmars-d-learn mailing list