Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49623 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8268 invoked from network); 13 Sep 2010 15:51:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Sep 2010 15:51:54 -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.21 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.21 smtp1.ist.utl.pt Linux 2.6 Received: from [193.136.128.21] ([193.136.128.21:37238] helo=smtp1.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 07/83-24501-6984E8C4 for ; Mon, 13 Sep 2010 11:51:52 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.ist.utl.pt (Postfix) with ESMTP id 8E40D700044A for ; Mon, 13 Sep 2010 16:51:47 +0100 (WEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp1.ist.utl.pt ([127.0.0.1]) by localhost (smtp1.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id n2GZZlYukiqH for ; Mon, 13 Sep 2010 16:51:47 +0100 (WEST) Received: from mail2.ist.utl.pt (mail2.ist.utl.pt [IPv6:2001:690:2100:1::c]) by smtp1.ist.utl.pt (Postfix) with ESMTP id 4A8787000424 for ; Mon, 13 Sep 2010 16:51:47 +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 121D32003A36 for ; Mon, 13 Sep 2010 16:51:47 +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> Date: Mon, 13 Sep 2010 16:51:54 +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.20100913172559.0d2277d0@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: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. >> Besides that, did you look at the other languages annotation support >> and how and why they are used? > > I have but I think we've hashed this many times in the past - PHP is > PHP, not C# or Java. There's a serious cost in complexity with every > new feature we add - especially a complicated syntax-rich feature like > that - which I believe we all too often fail to factor into our > discussions. > The fact that PHP is not C# or Java doesn't mean we shouldn't look for useful features in those languages, so it's not an argument. What you have to say is why you think annotations, while possibly making sense in C# or Java (depending on your position on that), do not make sense in PHP. I also think you are overestimating the complexity introduced by this feature. The patch is not particularly complex. We have doubtfully useful features such as LSB which are more complex not only in implementation, but also in usage. I though adding support for this was more or less consensual, and it was just a matter of tuning important but secondary details. -- Gustavo Lopes