Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49725 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43275 invoked from network); 16 Sep 2010 19:03:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Sep 2010 19:03:12 -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.82.170 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.82.170 mail-wy0-f170.google.com Received: from [74.125.82.170] ([74.125.82.170:51733] helo=mail-wy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/CC-15036-BE9629C4 for ; Thu, 16 Sep 2010 15:03:11 -0400 Received: by wyf19 with SMTP id 19so1707429wyf.29 for ; Thu, 16 Sep 2010 12:03:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+Iq46jBLecb7r3hblpsw79OMW9TdWPq8j3O3uLvUWMc=; b=ZkExK6tWCjFsoPIcmqy5kYg4Fvv1QrGojpUxXcccmxkYL+mM2VxRB2QFVgL8ImEZz9 vQ0hD7oxpQzW+kYASyqs6Wk3P//USeDUOqXOFnkQ24b+v/yFF3QXTTH2Kaxa07XYCQBM g6y9olyk+B6kimm/R7LXfAKL23Ajvh01eFa0s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=o6dbG1KWpPqPlHWVEGFJLIP44YW8szWzBgVtD3zmgJfXu4JHliNA2WSlb8ITz6ZYUn DI8Uc7BZs16eX8E9Hj/3j29pxnVrfOU6lJ2R5bztpuMnkMBP/zwiLIBzG7k7cA1nEsl2 v587dp0eeBF5XV+GJGqtoHz8NQDWujU9raYL8= MIME-Version: 1.0 Received: by 10.216.164.66 with SMTP id b44mr7082025wel.81.1284663783833; Thu, 16 Sep 2010 12:03:03 -0700 (PDT) Received: by 10.216.55.130 with HTTP; Thu, 16 Sep 2010 12:03:03 -0700 (PDT) In-Reply-To: <4C926574.8030805@sugarcrm.com> 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> <4C926574.8030805@sugarcrm.com> Date: Thu, 16 Sep 2010 16:03:03 -0300 Message-ID: To: Stas Malyshev Cc: Gustavo Lopes , Derick Rethans , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: PHP Annotations RFC + Patch From: guilhermeblanco@gmail.com (Guilherme Blanco) Hi Stas, On Thu, Sep 16, 2010 at 3:44 PM, Stas Malyshev wro= te: > Hi! > >> Again, we should not consider docblock mainly because I think >> adding/removing comments of your code should NEVER modify the overall >> functionality of your application. > > It's a circular argument - "we can't use docblocks because docblocks > shouldn't be used". They are not "comments" if you don't use them as > comments. I mean that any code packer can degrade the the functionality of your app. Example: class FakeTest extends \PHPUnit_Framework_TestCase { /** * @expectedException RuntimeException */ public function testShouldThrowException() { throw new \RuntimeException('FakeTest failed.'); } } Would become: class FakeTest extends \PHPUnit_Framework_TestCase { public function testShouldThrowException() { throw new \RuntimeException('FakeTest failed.'); } } And your test suite has now one failure. As I said previously, comments are human readable data ONLY and should not be shared between your code functionality and documentation. Otherwise, let's rename the concept of docblock (documentation block) to metadata block. IMHO, it is conceptually wrong that by removing a comment from your code may affect how your application works. At most, it should be less documented, nothing else. > >> That said, docblock is no option. Now PLEASE let's stop arguing for >> nothing and vote? > > I do not think we should stop discussing some topic just because somebody > has made up his mind. Voting is fine, but "OK, I have made my mind, > everybody shut up and vote" is not. I didn't mean we should stop the discussion. I meant that like many others over the years lead to nowhere if we don't take the correct action: vote. We can still continue the thread here, I just wanted people to stop arguing about nothing (or even deviating the thread from its original subject) without actually make any clever point. > >> I'd recommend that since syntax is not ideal, we should not vote for >> the complete patch but vote for the functionality. >> >> So the question to be answered is: Should PHP support Annotations? >> > > WTF is "Annotations"? We didn't define it yet. Should PHP support > Fooblahblations? Sure, I'm +1 on it, let's vote. I would point the wikipedia link, but it contains very weird description. "In the year 2065, aliens rule the Earth. Why? Because Noah Katz took over the world with the help of his alien friends. He calls himself a king, but a warrior among the rebelling people is about to rise up against the alien empire to reclaim the Earth for the human race. This warrior is the all-powerful Zeus of Mount Olympus. The Greek gods are angry, and will not have their world taken by some people that possibly come from another universe. The end of the alien empire will soon come." So I'd recommend (although I didn't like how it was written) the Java Annotation wikipedia page: http://en.wikipedia.org/wiki/Java_annotation > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 > --=20 Guilherme Blanco Mobile: +55 (16) 9215-8480 MSN: guilhermeblanco@hotmail.com S=C3=A3o Paulo - SP/Brazil