Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81925 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88307 invoked from network); 5 Feb 2015 13:41:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2015 13:41:07 -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.174 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.174 mail-vc0-f174.google.com Received: from [209.85.220.174] ([209.85.220.174:54073] helo=mail-vc0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/2C-27691-1F273D45 for ; Thu, 05 Feb 2015 08:41:07 -0500 Received: by mail-vc0-f174.google.com with SMTP id le20so2695089vcb.5 for ; Thu, 05 Feb 2015 05:41:02 -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=5vmWykP690C/s65N5Ed5Mk44HyuzOS8smX1tqsZmdo0=; b=Q3HOoyYVMvldsyhiOrSmSuB1ujIYJ4X329bmZpLpQISTsPvbrlyCs8jhg38Jsev66F MHmA/W6YDVIQs2qPp7xj0k2AdTooIdaRTrhp/MV4sTkBOF5GGqwKg7urQwr4N6gOr0hX HFcew/97grvlUYHi7NQk5LYYrw1Aq8CTCDh2MH95Vkbt6LH40OL5OygSuuFAy7gPefBt GHe5d3EQ6rEVTvOMNcSIxFt9X8ZcumG/FKY5k1o1fapUYsuXj3/NKj/zdvOFW5xZfMKo gf9Eoq2+nGJrMQm2ipsNwSdSdWgfaGHBdaU1EapSqPGG+yoB0hB90eF+Qi0p2PkZygYq 7y+w== X-Gm-Message-State: ALoCoQkFiuOxzQcLL328uOoceXahYKrirpsQ6IHYkbES79Sked/fmzCURsd2LI1NTRSEIj4APGcYx533/XEcIt9Ner3XYN6O0W3+NWd7GAB8qld/cjpLzixsmurLBXBFo+iH6NxZLPFHlgGG9ZizJUbuvWHowN6DyA== MIME-Version: 1.0 X-Received: by 10.52.26.110 with SMTP id k14mr1659342vdg.65.1423143662436; Thu, 05 Feb 2015 05:41:02 -0800 (PST) Received: by 10.52.74.73 with HTTP; Thu, 5 Feb 2015 05:41:02 -0800 (PST) In-Reply-To: <01d601d04146$6fbda4c0$4f38ee40$@tekwire.net> References: <01d601d04146$6fbda4c0$4f38ee40$@tekwire.net> Date: Thu, 5 Feb 2015 17:41:02 +0400 Message-ID: To: =?UTF-8?Q?Fran=C3=A7ois_Laupretre?= Cc: Yasuo Ohgaki , PHP Internals Content-Type: multipart/alternative; boundary=20cf307d048276d95a050e577402 Subject: Re: [PHP-DEV] Design by Contract From: dmitry@zend.com (Dmitry Stogov) --20cf307d048276d95a050e577402 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Yeah, this may work. The only problem, that it looks not native and defines additional language for constraints. I don't talk it's wrong. Both approaches may make sense, but of course, we have to select one. Thanks. Dmitry. On Thu, Feb 5, 2015 at 4:19 PM, Fran=C3=A7ois Laupretre wrote: > Hi Dmitry, > > > De : Dmitry Stogov [mailto:dmitry@zend.com] > > > > Following our conversation, I tried to imagine how DbC should look like > in > > PHP from user perspective. Finally, I was influenced by the semantic > > proposed in D, and syntax proposed for Java. So, these are my initial > > thoughts: > > Please have a look at https://wiki.php.net/rfc/dbc, just the beginning, > up to 'Pre-conditions'. It contains 2 examples. This is not D syntax, whi= le > functionally similar, because I want to preserve BC and provide built-in > checks on phpdoc declared types. > > Cheers > > Fran=C3=A7ois > > > --20cf307d048276d95a050e577402--