> One reason I would like to use __invariant() is to allow overriding
parents.

Well, another approach would be optionally named contracts:

class Some {
    require contractName (invariant-expr);
    /* ... */
}

This would also improve default error messages as a by-product.

Cheers
Joe

On Tue, Feb 10, 2015 at 7:06 AM, Yasuo Ohgaki <yohg...@ohgaki.net> wrote:

> Hi Joe,
>
> On Tue, Feb 10, 2015 at 3:59 PM, Joe Watkins <pthre...@pthreads.org>
> wrote:
>
>> I'm not sure we can always enforce invariant contracts ...
>>
>> Evaluating invariant expressions on entry and exit is not enough, since a
>> property can be changed without the use of a method.
>>
>> Can or should, we do anything about that ?
>>
>> This should also be covered in the RFC, I think.
>>
>
> One reason I would like to use __invariant() is to allow overriding
> parents.
> I think we should have way for it, but I don't have good idea now.
> I'm still thinking.
>
> Regards,
>
> --
> Yasuo Ohgaki
> yohg...@ohgaki.net
>

Reply via email to