Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49626 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13891 invoked from network); 13 Sep 2010 16:11:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Sep 2010 16:11:20 -0000 Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.22 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.22 smtp2.ist.utl.pt Linux 2.6 Received: from [193.136.128.22] ([193.136.128.22:54939] helo=smtp2.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 70/A4-24501-62D4E8C4 for ; Mon, 13 Sep 2010 12:11:19 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp2.ist.utl.pt (Postfix) with ESMTP id E40EB7000453 for ; Mon, 13 Sep 2010 17:11:15 +0100 (WEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp2.ist.utl.pt ([127.0.0.1]) by localhost (smtp2.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id rqdcdrBr58GH for ; Mon, 13 Sep 2010 17:11:15 +0100 (WEST) Received: from mail2.ist.utl.pt (mail2.ist.utl.pt [IPv6:2001:690:2100:1::c]) by smtp2.ist.utl.pt (Postfix) with ESMTP id A2807700044F for ; Mon, 13 Sep 2010 17:11:15 +0100 (WEST) Received: from cataphract-old.dulce.lo.geleia.net (a79-168-249-157.cpe.netcabo.pt [79.168.249.157]) (Authenticated sender: ist155741) by mail2.ist.utl.pt (Postfix) with ESMTPSA id 7523F2003A37 for ; Mon, 13 Sep 2010 17:11:15 +0100 (WEST) Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: internals@lists.php.net References: <4C873C0F.1010200@zend.com> <4C879613.7090709@zend.com> <4C887D2B.2000605@zend.com> <4C8AC526.7000505@sugarcrm.com> <4C8B6168.30504@mohiva.com> <4C8BC81E.8000605@sugarcrm.com> <7.0.1.0.2.20100913145703.0d226d90@zend.com> <7.0.1.0.2.20100913172559.0d2277d0@zend.com> <7.0.1.0.2.20100913175454.0d2273f8@zend.com> Date: Mon, 13 Sep 2010 17:11:24 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Organization: =?iso-8859-15?Q?N=FAcleo_de_Eng=2E_Biom=E9dica_?= =?iso-8859-15?Q?do_IST?= Message-ID: In-Reply-To: <7.0.1.0.2.20100913175454.0d2273f8@zend.com> User-Agent: Opera Mail/10.61 (Win32) Subject: Re: [PHP-DEV] Re: PHP Annotations RFC + Patch From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") On Mon, 13 Sep 2010 16:59:13 +0100, Zeev Suraski wrote: > At 17:51 13/09/2010, Gustavo Lopes wrote: >> On Mon, 13 Sep 2010 16:28:47 +0100, Zeev Suraski wrote: >> >>> At 16:39 13/09/2010, Pierre Joye wrote: >>>> You are not serioulsy suggesting to use phpdoc for runtime annotation >>>> support? Are you? >>> >>> I actually am (either that or get what you want done in some other >>> way). It's a rare enough use case that I think it's a very reasonable >>> compromise. The disadvantages of adding a whole new branch of syntax, >>> for this rare use case, far outweigh its advantages - IMHO. >> >> Rare use case? Have you seen any recent Java framework? Or Java EE 6? Or >> design by contract in C#? A declarative programming style can be very >> handy. > > Framework code (as in code that actually goes into a framework, not code > that uses a framework) represents a tiny percentage of the PHP codebase > at large. Most of it is application code. > You misunderstood me. When I say the frameworks use annotation I don't mean they use annotations in their own implementation (that's not particularly relevant for the reason you present). What I mean is that the frameworks recognize annotations the application code has so that the framework user can do stuff like injecting objects, run methods in transactions or check post-conditions in a declarative fashion, by adding annotations. By the way, you ignored the rest of the e-mail. How do you evaluate the complexity/return of features such as annotations with that of e.g. LSB? Why are they not adequate for PHP, but may be for other languages? -- Gustavo Lopes