Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82424 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28483 invoked from network); 11 Feb 2015 07:02:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Feb 2015 07:02:17 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.220.179 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.179 mail-vc0-f179.google.com Received: from [209.85.220.179] ([209.85.220.179:33757] helo=mail-vc0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0D/35-33902-87EFAD45 for ; Wed, 11 Feb 2015 02:02:16 -0500 Received: by mail-vc0-f179.google.com with SMTP id hy4so569347vcb.10 for ; Tue, 10 Feb 2015 23:02:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=5h0RDhlm8r5EIMbVt41b5BUVJKQTieijuCFv7WR0ooA=; b=AbV84GpKN1t0aniFfDRVBYveEeiVeeH8qsjhX3qmGY+PYcl6LgecbnW1lqJ59/dLOu hHUaawpyR+dN83XCDH4edcbMyKFbxHS+Zc4uQXEG3M868tOAonOIjZdKpoSwBohGRcna yYIFWaw/LDdaBFLoW7lLVI+RqP6EhR8yFouMXVz8EVDgCFOnLNDkl41tGxR7eY2osy4K cmBwii26cs6O7VfANa+4ACisnuiegQYn/VqTKK66Sz5YQ/pgYQfCBKVeU9oU7so0+3+V 8Gur0GAyAfraHwPd/aZBSzMAmUNDHOhFA2UT5T8bhuQZ2hwAmW2INQ9fajGArI7NWppg IoYg== X-Gm-Message-State: ALoCoQm+VO7F2oy/GJUYdo5cWauGmPMxC+3DonvwRpOWPkHLX4OVG6I9pIH6qO9LELGrXdc9hoOaMK7TtSUA3JWCM+EMLChO6qoNEmtmiPgUErtZq4uSWxkF7Y51To1ffxBhAZN6kq796j2ODieb99H8BISq7jTW4A== MIME-Version: 1.0 X-Received: by 10.52.139.7 with SMTP id qu7mr14951818vdb.68.1423638133902; Tue, 10 Feb 2015 23:02:13 -0800 (PST) Received: by 10.52.74.73 with HTTP; Tue, 10 Feb 2015 23:02:13 -0800 (PST) In-Reply-To: References: <54D7ED22.3080001@gmail.com> Date: Wed, 11 Feb 2015 11:02:13 +0400 Message-ID: To: Yasuo Ohgaki Cc: Joe Watkins , Patrick Schaaf , internals Content-Type: multipart/alternative; boundary=bcaec52d53ab42a722050eca9504 Subject: Re: [PHP-DEV] Design by Contract From: dmitry@zend.com (Dmitry Stogov) --bcaec52d53ab42a722050eca9504 Content-Type: text/plain; charset=UTF-8 I think we can't support contracts on interfaces and abstract methods. How D works? Thanks. Dmitry. On Wed, Feb 11, 2015 at 1:56 AM, Yasuo Ohgaki wrote: > 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 > --bcaec52d53ab42a722050eca9504--