On Friday, 3 August 2012 at 19:43:18 UTC, Simen Kjaeraas wrote:
On Fri, 03 Aug 2012 21:36:41 +0200, H. S. Teoh <[email protected]> wrote:

IMO, if you need to be changing stuff inside invariants, then you're using it wrong. Invariants are intended to verify program logic, not to do things like altering object state. The point is to be able to compile with invariant code turned off, and still have the program work exactly
as before.

True. Then add in a (standard) library that's not const-correct, and you
have invariants that are outright unusable.

Personally I feel D's contracts are still a bit off of what Eiffel, .NET and Ada 2012 offer.

--
Paulo

Reply via email to