Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52173 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92739 invoked from network); 9 May 2011 18:08:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 May 2011 18:08:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=guilhermeblanco@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=guilhermeblanco@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.83.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: guilhermeblanco@gmail.com X-Host-Fingerprint: 74.125.83.42 mail-gw0-f42.google.com Received: from [74.125.83.42] ([74.125.83.42:57362] helo=mail-gw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CC/6F-20726-F8D28CD4 for ; Mon, 09 May 2011 14:08:16 -0400 Received: by gwb17 with SMTP id 17so2302546gwb.29 for ; Mon, 09 May 2011 11:08:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=POCZ0MiS18fzmpWVpgsOKYBwL8FTBgbSKClZw/tyj1Q=; b=BzRSkdsLelPeXamzqHG2xDaLp+udH+2tTb91cnQTl/XOA4WN0ykMo+cWfbrkMeAn5P vwCWhiHZDxWoRDxi+5WsggclzsIGWpemhWSNLN5idFYGnC6kBlSwtwBxQvmPCnzSTwYJ hmkxma/Phasan8V/K9DJoczxwANCn8EGmdk64= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=ifyZqif/8AcEVvl16f5JKgIWicChKKhJx6eAzC/iS4qSDiUf3HDVGrLmg7YyZIYJ6J 2Wb07Tc2WzW9/i9CfT6Zeo481MTCZltZbn9jw7aDf9RMFGt/hWL5bJek+Dx/itrwG8cF 6BKWhfSFO3MoIzp6KZHvhPUoD7yeso92A8Zlg= Received: by 10.151.136.2 with SMTP id o2mr5643512ybn.204.1304964492068; Mon, 09 May 2011 11:08:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.147.171.4 with HTTP; Mon, 9 May 2011 11:07:52 -0700 (PDT) In-Reply-To: <4DC82A36.8090604@lerdorf.com> References: <4DC826B1.4090806@lerdorf.com> <4DC82A36.8090604@lerdorf.com> Date: Mon, 9 May 2011 15:07:52 -0300 Message-ID: To: Rasmus Lerdorf Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Please let's not bitch about lazy users not learning C to implement THEIR missing feature. (Was Re: [PHP-DEV] 5.4 again) From: guilhermeblanco@gmail.com ("guilhermeblanco@gmail.com") Hi Rasmus, Thanks a lot for the response. This was the first email that I got that is not rude against my patch. I have worked on Doctrine annotations support (which is being used by Symfony and also Typo3), which is a LL(*) parser that processes docblocks and uses runtime classes to build associated information. This relies on 2 points to correctly work: a reader and a cache. These ones are required for 2 reasons: - PHP doesn't currently support annotations (so ReflecionClass/ReflectionProperty/ReflectionMethod cannot have a simplified API to getAnnotations()). The Reader is a composition over ReflectionAPI. - Parsing is expensive and I cannot plugin opcache. To fix the overhead of processing every request, I plugged a cache support. What I thought it could be changed is: - Allow PHP to support it natively and also take advantage of opcode cache - Make API cleaner That's where the idea came. I voted for having it native to ZE because a code with and without comments should behave the same. So this made me to work on something that could be merged into php-src. If possible, could you look at the patch and give me high level ideas of what could be changed? Thanks On Mon, May 9, 2011 at 2:53 PM, Rasmus Lerdorf wrote: > On 05/09/2011 10:48 AM, guilhermeblanco@gmail.com wrote: >> >> Rasmus, >> >> I already wrote an RFC, I already wrote a patch and none from php-src >> gave me some valuable feedback. >> During private conversations while flaming messages were popping on ML >> thread, I updated the code to be more PHP compatible and when I went >> to update the RFC on wiki, it became offline. >> >> BTW, if you think Annotations wouldn't be so popular, please tell the >> Symfony users (Routing, Validation), Doctrine users (Entire Mapping), >> Typo3 users, Zend Framework (XML-RPC), PHPUnit users that this feature >> is useless. If this doesn't count 2000 users using the feature, I >> think only wordpress users may count this. > > Nobody has argued that there isn't a use for annotations. There obviously > is. The argument is whether it needs to be in the core of the language wh= en > it isn't inherently a runtime thing. A single standard for annotations an= d > non-runtime tools for manipulating that standard is a viable approach as > well. That is what people are doing now, except they all picked different > ways of doing it. By putting it into the core you are solving that proble= m > since everyone will likely switch to it, but the argument is that that is > not a good enough justification for putting it into the core of the > language. > > -Rasmus > > --=20 Guilherme Blanco Mobile: +55 (16) 9215-8480 MSN: guilhermeblanco@hotmail.com S=C3=A3o Paulo - SP/Brazil