On Monday, 26 June 2017 at 21:06:10 UTC, Timon Gehr wrote:
The DIP is missing the corresponding syntax for invariants:

class C{
    private int x=1;
    invariant(x>0, "x must stay positive");
}

Implementation:
https://github.com/dlang/dmd/compare/master...tgehr:contract-syntax

Well done. It seems to speak to the intuitive nature of the design that it's so easy to deduce how it would work in this context.

Reply via email to