Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82396 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69162 invoked from network); 10 Feb 2015 22:57:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Feb 2015 22:57:41 -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.54 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.216.54 mail-qa0-f54.google.com Received: from [209.85.216.54] ([209.85.216.54:40887] helo=mail-qa0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 60/F5-32490-4EC8AD45 for ; Tue, 10 Feb 2015 17:57:41 -0500 Received: by mail-qa0-f54.google.com with SMTP id x12so3130080qac.13 for ; Tue, 10 Feb 2015 14:57:38 -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=R9rF7eX2yzWe1GqqpOK0LfUqAYswvFOU3MaQKx3Poro=; b=JqtjAfLp1UVlN+wpM8m8h2J4W3jo/VQNc6Ey3MEIpx8tbS1+t+kxYAzzwpCtyIU0eL T6SJO3S9LjSvlrwh0meCoKNtElq4AppzNHw44L2TyNlDyPeKE7CChYv1n0kA4/zlDZbM VyTmXCdgc6J3AKTR5udWeVd1QiMTpAcPMo5fl5uD0RD1+y0EXKy8e7hpXiSSbVSWABBm IzbOt353L55Nsn+PjrjjFHw2V4eLwtj2R2GbCXTaMX1jFTzbsanRTVINBv16Vd05G0L/ rE7aMRYydXZRuFFUgPg1ToFioAYWdd0nEKZpOUx9cdgr05VStlqhSh7IDG0xWJBNjhOb TdsQ== X-Received: by 10.229.219.10 with SMTP id hs10mr40480585qcb.11.1423609058273; Tue, 10 Feb 2015 14:57:38 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.250.195 with HTTP; Tue, 10 Feb 2015 14:56:58 -0800 (PST) In-Reply-To: References: <54D7ED22.3080001@gmail.com> Date: Wed, 11 Feb 2015 07:56:58 +0900 X-Google-Sender-Auth: ISCyVdLBVcJ4h9gZLxmASYNKJLU Message-ID: To: Dmitry Stogov Cc: Joe Watkins , Patrick Schaaf , internals Content-Type: multipart/alternative; boundary=001a1134856637ae3d050ec3d02d Subject: Re: [PHP-DEV] Design by Contract From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a1134856637ae3d050ec3d02d 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. > A little more clarification, following interface definition is allowed or not? interface Some { require($this->last_result > 1000); // Force classes to have $this->result function bar($a, $b) require($a > $b) return($ret, $ret > 1000); function getLastResult() return($ret, $this->last_result === $ret); } I suppose it is supported, but it may be better to be explicit. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a1134856637ae3d050ec3d02d--