Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82387 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33606 invoked from network); 10 Feb 2015 17:00:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Feb 2015 17:00:44 -0000 Authentication-Results: pb1.pair.com header.from=nf.laupretre@yahoo.fr; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=nf.laupretre@yahoo.fr; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain yahoo.fr from 212.27.42.2 cause and error) X-PHP-List-Original-Sender: nf.laupretre@yahoo.fr X-Host-Fingerprint: 212.27.42.2 smtp2-g21.free.fr Received: from [212.27.42.2] ([212.27.42.2:41240] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 70/10-32490-A393AD45 for ; Tue, 10 Feb 2015 12:00:42 -0500 Received: from moorea (unknown [82.240.16.115]) by smtp2-g21.free.fr (Postfix) with ESMTP id D43C94B01AE; Tue, 10 Feb 2015 17:57:05 +0100 (CET) Reply-To: To: "'Alexander Lisachenko'" Cc: "'internals'" , "'Dmitry Stogov'" , Date: Tue, 10 Feb 2015 18:00:36 +0100 Message-ID: <05bf01d04553$177610c0$46623240$@yahoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AdBFUwoTTp1PuUIFQU6lMLYq+JQ2sQ== Content-Language: fr X-Antivirus: avast! (VPS 150210-0, 10/02/2015), Outbound message X-Antivirus-Status: Clean Subject: RE: [PHP-DEV] Design by Contract From: nf.laupretre@yahoo.fr ("F & N Laupretre") Hi Alexander, > De : Alexander Lisachenko [mailto:lisachenko.it@gmail.com] >=20 > This is built on top of reflection+annotation+parser extension. > Why not to implement this for PHP? From my point of view, this is just = an > additional feature, that can be used by limited number of developers. I like the idea. IMO, DbC directives should be defined outside of = function body. I proposed doc blocks because it exists and is already = parsed but a generic syntax for annotations along with a full API to = interact with extensions would be much better. Most important : if we define that, for example, everything outside of a = class/function enclosed in [], is an annotation, it is easy to enhance = PHP 5 to ignore such syntax, without having to backport the whole = feature. So, people can start using it for PHP 7 and keep the = possibility to run their code under PHP 5. That's something that would = be much harder with the current dbc2 proposal. I will modify my RFC (https://wiki.php.net/rfc/dbc) to open it to any = sort of annotations. Do you think you have enough time to write something in due time ? Ask = for help if you need. Regards Fran=C3=A7ois