Re: Design by Contract

From: Date: Tue, 10 Feb 2015 21:41:38 +0000
Subject: Re: Design by Contract
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  Groups: php.internals 
Request: Send a blank email to internals+get-82393@lists.php.net to get a copy of this message
Hi Dmitry and Joe, On Wed, Feb 11, 2015 at 6:29 AM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote: > On Tue, Feb 10, 2015 at 8:53 PM, Dmitry Stogov <dmitry@zend.com> wrote: > >> You are welcome to edit https://wiki.php.net/rfc/dbc2 >> It looks like we have similar views, so just make it better in a way you >> think. >> > > Looks good to me. It's much better than original. Thank you folks. > We have related issue like how internal module incorporate with DbC. > However > these could be future issues. > It seems we are better to have scope explanation. precondition/invariant does not matter but postcondition is. For example, function foo() { return($ret, $ret > 0 && $tmp > 0, 'Error'); $tmp = 0; // do something using $tmp } if this is allowed or not is ambiguous. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net

« previous php.internals (#82393) next »