Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84094 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76781 invoked from network); 1 Mar 2015 04:26:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Mar 2015 04:26:08 -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.47 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.216.47 mail-qa0-f47.google.com Received: from [209.85.216.47] ([209.85.216.47:47756] helo=mail-qa0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 60/22-63732-DD492F45 for ; Sat, 28 Feb 2015 23:26:06 -0500 Received: by mail-qa0-f47.google.com with SMTP id v10so18517026qac.6 for ; Sat, 28 Feb 2015 20:26:02 -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=fWdNubkMLukjuvaR1o3i7rwdbmi96c2Xi8sl9OTQ9hQ=; b=y2Cdz9liPf/lvRHmIqs8oNl7QhVLh0PnfjKm/wZlvmIrBiKGDBoUSXdrowNBCW7PJ6 9BBdYtLX3T/1/o/ZQbJ+TAEtsFlX+nZkVZe5YWFo5OvIhxIOf1ujOUWHoOp3iYnj1lQq EOVgzSIef3PKPWhe9gW1qNOwZ9lQCbAO6yOU1ciMwzeWK8SS9eX9qTQ1/EMzA8vojj0I bnt6PH3kfNBP3zH6CUcqUnejv6nf/FkEcisPsTMwaxpUhQ1gJuo1Dc9fW947+OnpzmYZ 5jXOhJsJlXbe7kvo9O3rNB0Uz5/YXYghHSRUrstTcuQiqgrdGCftqM3xER4zzJpVAk7N zwjQ== X-Received: by 10.55.23.4 with SMTP id i4mr3375998qkh.70.1425183962730; Sat, 28 Feb 2015 20:26:02 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.198.8 with HTTP; Sat, 28 Feb 2015 20:25:22 -0800 (PST) In-Reply-To: <54F28864.7000007@gmail.com> References: <54F28864.7000007@gmail.com> Date: Sun, 1 Mar 2015 13:25:22 +0900 X-Google-Sender-Auth: CjGdGsAOdYAGXv-5ep_XqfW6AUo Message-ID: To: Stanislav Malyshev Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11470c5ad6991e0510327f82 Subject: Re: [PHP-DEV] [RFC] Design by Contract - Vote only RFC From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11470c5ad6991e0510327f82 Content-Type: text/plain; charset=UTF-8 Hi Stas, On Sun, Mar 1, 2015 at 12:32 PM, Stanislav Malyshev wrote: > > https://wiki.php.net/rfc/introduce_design_by_contract > > > > This is vote only RFC for 2 competing Design by Contract(DbC) RFCs. > > Please comment if you have any for this RFC. > > I don't see why the first one needs any vote. It is supposed to be > implemented as an extension, so why not go and implement an extension, > and put it in PECL, and then propose it for core inclusion, if it proves > popular? > It's possible option with PHP7's AST. > > As for the second one, do we really need the syntax change that would > just move asserts to before { instead of after? If we already have > zero-cost asserts, why just not use them? Assertion only DbC has limitations. - Invaliants - Postconditions Without native DbC support, it ends up with messy code which is harder to read. Less code readability decreases maintainability. Therefore, it increases chance of bugs. This is the reason why there are languages/extensions for DbC in other languages. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11470c5ad6991e0510327f82--