Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64735 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98605 invoked from network); 9 Jan 2013 12:16:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jan 2013 12:16:43 -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:53308] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 91/16-02684-AAF5DE05 for ; Wed, 09 Jan 2013 07:16:43 -0500 Received: from localhost (xdebug.org [127.0.0.1]) by xdebug.org (Postfix) with ESMTPS id 822A910D62E; Wed, 9 Jan 2013 12:16:38 +0000 (GMT) Date: Wed, 9 Jan 2013 12:16:38 +0000 (GMT) X-X-Sender: derick@whisky.home.derickrethans.nl To: Rafael Dohms cc: Stas Malyshev , Pierre Joye , Pierrick Charron , "internals@lists.php.net" In-Reply-To: Message-ID: References: <50EBDEEE.8070605@sugarcrm.com> <50EC6569.6030202@sugarcrm.com> <50EC917C.3070805@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, Rafael Dohms wrote: > On Tue, Jan 8, 2013 at 10:37 PM, Stas Malyshev wrote: > > > > Everyone I talked to who implemented annotations in docblocks did it > > > as hack because there is no native support. This is not something that > > > belongs to docblocks. It would be nice if you could take a look at the > > > c# doc, there are really good concepts there. > > > > I know why they did it, and we already discussed that stuff in the last > > annotation discussion. What I mean here is that presenting it as if the > > notion of meaningful comments is completely unheard of in PHP and nobody > > expects it is just wrong. Maybe it was so years ago, but it is > > definitely not true now - de-facto meaningful comments *are* the > > standard now, and have a lot of use, and nobody with any experience is > > surprised by them. Regardless of *why* is it so, it is a fact. > > That still does not make it the right place. Huh? Why not? If it's something that everybody does (docblocks documenting methods/parameters), why change it? > Annotations went into docblocks because it was the only place > reflection could provide the needed information at runtime. Just > because we now treat docblocks as 1st class citizens does not mean > annotations should be there. > > Does that mean that annotations should be in docblocks and not in core > for the reason of "we all know docblocks exist". I would seriously expect > at the very least a stronger reason. These were some of the ones i heard > before: > > 1. The syntax is crap: this is solvable, let's find the right syntax Any extra syntax makes the PHP parser more complicated (and arguably slower). I don't want to have it slower/more complex for some arbitrary extra syntax just for some weird annotations. cheers, Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug Posted with an email client that doesn't mangle email: alpine