Re: Design by Contract
| From: | Yasuo Ohgaki | Date: | Tue, 10 Feb 2015 07:06:43 +0000 |
| Subject: | Re: Design by Contract | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-82339@lists.php.net to get a copy of this message | ||
Hi Joe,
On Tue, Feb 10, 2015 at 3:59 PM, Joe Watkins <pthreads@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
yohgaki@ohgaki.net