Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82317 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34845 invoked from network); 9 Feb 2015 20:28:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Feb 2015 20:28:42 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.52 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.216.52 mail-qa0-f52.google.com Received: from [209.85.216.52] ([209.85.216.52:34959] helo=mail-qa0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E0/67-25034-77819D45 for ; Mon, 09 Feb 2015 15:28:41 -0500 Received: by mail-qa0-f52.google.com with SMTP id v10so8559323qac.11 for ; Mon, 09 Feb 2015 12:28:37 -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=ligH+BtzVqWuoW3/Hn81A1vltCj7L/5Vd9nR6atq/H4=; b=WSVgGHpm2QLlHx8DFk41Up7REXD0p2FLHRmidjgyDs52dOo2lLrGrfxbzWlyYdSDgc tDiZz4i60iU6uVhhbzcPl5GnVdRdB0z77yPBsmck2XCbkfv+L17soQmX4S0wSxOBt+p6 /jKhM2eHiGao59LaZlmzk0I3SElqLaymDW189WtkE7US7jjroqxNo6YoJS6pvFBuQpYb AlrXgjKM5xj0oDC+OyhcCeU36bP3ZtrLwOH+9pQdO/iyTSsN0NIybD0znVV24luqKWpN II4yZzdCrFIM+uYJTrLLd0PS2UadCitqfohDT6bEQWUD/DSIjuGbE2ZF2TjBdRgODG3o 5gxg== X-Received: by 10.140.42.83 with SMTP id b77mr38450887qga.43.1423513716978; Mon, 09 Feb 2015 12:28:36 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.28.72 with HTTP; Mon, 9 Feb 2015 12:27:56 -0800 (PST) In-Reply-To: References: <54D7ED22.3080001@gmail.com> Date: Tue, 10 Feb 2015 05:27:56 +0900 X-Google-Sender-Auth: oioOB2ACFm0liURGTmtyGTM1_k8 Message-ID: To: Dmitry Stogov Cc: Joe Watkins , Stanislav Malyshev , PHP Internals Content-Type: multipart/alternative; boundary=001a11c130546f130a050ead9d9f Subject: Re: [PHP-DEV] Design by Contract From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11c130546f130a050ead9d9f Content-Type: text/plain; charset=UTF-8 Hi all, On Tue, Feb 10, 2015 at 5:19 AM, Yasuo Ohgaki wrote: > Use of interface: > - no additional keyword (pros) > - requires interface for DbC, most classes does not require interface > (cons) > - if interface is not used, user has to repeat invariant conditions over > and over (cons) > - requires to define method that should not exist in production (cons) > > New keyword: > - does not require interface for efficient definition (pros). > - new keyword (cons) > > It seems we are better to choose proper keyword for 'invariant'. > 'invariant' is not common, so 'invariant' > may be good enough choice. Does anyone use 'invariant' as > function/method/class/constant names? > If there is better name, suggestion is appreciated. > It might be be better to use special method. No keyword, use only reserved method name __func(). I'll write what I think that are better for PHP in the RFC. We may discuss anything here to complete the RFC. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11c130546f130a050ead9d9f--