Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64730 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90894 invoked from network); 9 Jan 2013 12:09:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jan 2013 12:09:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:33304] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AC/44-02684-2FD5DE05 for ; Wed, 09 Jan 2013 07:09:23 -0500 Received: from localhost (xdebug.org [127.0.0.1]) by xdebug.org (Postfix) with ESMTPS id 1C9D710D628; Wed, 9 Jan 2013 12:09:18 +0000 (GMT) Date: Wed, 9 Jan 2013 12:09:18 +0000 (GMT) X-X-Sender: derick@whisky.home.derickrethans.nl To: Pierrick Charron cc: Stas Malyshev , Rasmus Schultz , "internals@lists.php.net" In-Reply-To: Message-ID: References: <50EBDEEE.8070605@sugarcrm.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] [RFC] Reflection annotations reader From: derick@php.net (Derick Rethans) On Tue, 8 Jan 2013, Pierrick Charron wrote: > On 8 January 2013 03:55, Stas Malyshev wrote: > > > On the contrary, plenty of implementations means there's a need in > > this functionality, and it might be a good idea to have one standard > > implementation if it can cover like 80% of use cases. Good luck with that! I've seen so many different syntaxes for docblock "annotations" out there that I doubt you can do this. > I agree, there is a need in this functionality, but all those userland > implementations were at the first place made because this > functionality was not part of the language. I think docblocks is not > the solution, doc blocks are just comments, and I would expect any > code to work the same way if I remove my comments. Actually, docblocks are handled by the parser. And whether "annotations" come in the form of such a docblock with a specific syntax, or without with a special new syntax outside of docblocks makes no difference at all. And really, nobody can convince me that we would need stuff like: @MyApp\Acl({ "allow"=@MyApp\Acl\Allow({"john"="read", "joe"="write"}), "deny"=@OtherApp\Acl\Deny(default="*", log=true) }) cheers, Derick