Invariant -- question #2

KennyTM~ kennytm at gmail.com
Tue Oct 21 06:25:25 PDT 2008


Bill Baxter wrote:
> Does using immutable for things that won't change mean that the
> compiler will eventually revert back to accepting the D1 function-like
> syntax for class invariants?
> 
> I.e.
>   invariant() {  some stuff  }
> Instead of
>   invariant { some stuff }
> 
> Not a huge deal for me.  I was just curious.  I seem to remember
> people saying this was one thing that made it hard to write code that
> is portable between D1 and D2.
> 
> --bb

but

   invariant() { ... }

is valid in D1 when D2 was released, isn't it?



More information about the Digitalmars-d mailing list