Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82393 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59681 invoked from network); 10 Feb 2015 21:42:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Feb 2015 21:42:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.41 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.216.41 mail-qa0-f41.google.com Received: from [209.85.216.41] ([209.85.216.41:59850] helo=mail-qa0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8C/34-32490-E3B7AD45 for ; Tue, 10 Feb 2015 16:42:22 -0500 Received: by mail-qa0-f41.google.com with SMTP id x12so11492065qac.0 for ; Tue, 10 Feb 2015 13:42:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=0OeIN79b7pOkOseHnWlG8eMUt58m7cxCjeCV1MYReL8=; b=Mvdv3hcPS+Xtt5px2+jHyzZ4Vgfa1Lr7af+p7B/p4dm8AMBiWpHr5efZx+0vmTQOYS QDwKlLmYTNhZ4PnbZYlMK1emkAPVd/i6uQa6fBlorx5Hs06HBK7NqzowZSDP9tTVlzeg 9ONSyPUafzoV39C9rLupk+Jbkx7n4uSmbVM3vWb1fwH4DKorwOM/RlxQFyWTYLcNx5V6 rUHTB7NCz1e/HxPhhbkLPN7LiVeUC9xYqlqC9q5tRw0MPs29f7wX2l8kaZ+LqC5OrAB4 wmbO6TX8sDYWyh259eUU8enAiawt7rDwmGIIjn8jgqzq5O9XK4DINeE9ZYXjtjd4p3Gw 9Ujw== X-Received: by 10.224.53.194 with SMTP id n2mr13380076qag.21.1423604539645; Tue, 10 Feb 2015 13:42:19 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.250.195 with HTTP; Tue, 10 Feb 2015 13:41:38 -0800 (PST) In-Reply-To: References: <54D7ED22.3080001@gmail.com> Date: Wed, 11 Feb 2015 06:41:38 +0900 X-Google-Sender-Auth: Yh1Wla-G7SJFcIAYzbHHI9fORpQ Message-ID: To: Dmitry Stogov Cc: Joe Watkins , Patrick Schaaf , internals Content-Type: multipart/alternative; boundary=001a1132f744e2e64e050ec2c236 Subject: Re: [PHP-DEV] Design by Contract From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a1132f744e2e64e050ec2c236 Content-Type: text/plain; charset=UTF-8 Hi Dmitry and Joe, On Wed, Feb 11, 2015 at 6:29 AM, Yasuo Ohgaki wrote: > On Tue, Feb 10, 2015 at 8:53 PM, Dmitry Stogov 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 --001a1132f744e2e64e050ec2c236--