Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82030 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11511 invoked from network); 6 Feb 2015 09:40:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Feb 2015 09:40:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.220.175 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.175 mail-vc0-f175.google.com Received: from [209.85.220.175] ([209.85.220.175:48412] helo=mail-vc0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 60/FC-45146-4FB84D45 for ; Fri, 06 Feb 2015 04:40:04 -0500 Received: by mail-vc0-f175.google.com with SMTP id la4so4657853vcb.6 for ; Fri, 06 Feb 2015 01:40:01 -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=brwE4Kg9EliWa8E1FFHs8ObLHzIRV6hA+Tmc/WlDRxI=; b=QinDfaXeXsCEaSryV7Ufj016DJqm8uDjTIHlmvijkTGejrbG/p1cb+Ob4N01/L2iwG LfJHFnaqd+K7Rbw3K4ZuCc5HQlT7CyVTGOd0TY+Bb8Sk7NSztaB6Qr/4mU7hZrzN3izR gvT3ZhGxr51gWogVuQ1pcIty6DXj0ve5jZzyJvyUHcUYPwhM6+71s2+eHkmRucaGMvcO 2lbiggkDLWq1bxVMk4eZA3WqacVgjV2hr+iORhdX4fl93SSQIe52ZjjoVn7Tn6R3SllJ aqeH6tNXF/n0QamPDspqnkU9VUzt3nKQRA/hXy2hrGvZJ7sy/dnjupeE0h1O0+ypYzxr GvYw== X-Gm-Message-State: ALoCoQl5PUKGQ90L8GYE0OuK//6pquNAnFVZTej+Es7zplG2WV3k/eP9AB1Eos1eVze9PFgC0gjVI3TOSAbwFXutIQ2CYl1/3hOE/6D1K8VyLPPQ29hr3hvAZ5sDr0DzlQ2NwYbQQvtRd9JTH+jLQIvWCRnoKksPpQ== MIME-Version: 1.0 X-Received: by 10.221.18.136 with SMTP id qg8mr1629582vcb.27.1423215601088; Fri, 06 Feb 2015 01:40:01 -0800 (PST) Received: by 10.52.74.73 with HTTP; Fri, 6 Feb 2015 01:40:00 -0800 (PST) In-Reply-To: References: <01d601d04146$6fbda4c0$4f38ee40$@tekwire.net> <020c01d0414b$2c3a1120$84ae3360$@tekwire.net> <022801d0415a$027e0620$077a1260$@tekwire.net> Date: Fri, 6 Feb 2015 13:40:00 +0400 Message-ID: To: Pierre Joye Cc: =?UTF-8?Q?Fran=C3=A7ois_Laupretre?= , Yasuo Ohgaki , PHP internals Content-Type: multipart/alternative; boundary=001a113399e657ed20050e68346a Subject: Re: [PHP-DEV] Design by Contract From: dmitry@zend.com (Dmitry Stogov) --001a113399e657ed20050e68346a Content-Type: text/plain; charset=UTF-8 annotations might be useful for DbC, but I doubt if they are more readable. < 0)>> < 0)>> < 0)>> function foo ($a, $b) { return $a + $b; } Also, to use them, we will have to develop them first (not a trivial task as well), but may be this is a right road. Thanks. Dmitry. On Fri, Feb 6, 2015 at 7:00 AM, Pierre Joye wrote: > On Thu, Feb 5, 2015 at 11:36 PM, Dmitry Stogov wrote: > > phpdoc is annotation as well, but to split it into specific attributes we > > have to write specialized parsers. > > Other languages support annotation or attributes that may be used more > > easily. > > > > http://docs.hhvm.com/manual/en/hack.attributes.php > > Exactly, phpdoc is used as annotation (or comments with some similar > syntax) but is definitively not aimed to be annotations. > > -- > Pierre > > @pierrejoye | http://www.libgd.org > --001a113399e657ed20050e68346a--