Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52273 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43669 invoked from network); 11 May 2011 07:22:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 May 2011 07:22:04 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 213.123.26.187 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 213.123.26.187 c2beaomr09.btconnect.com Received: from [213.123.26.187] ([213.123.26.187:1032] helo=mail.btconnect.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C0/00-43568-9193ACD4 for ; Wed, 11 May 2011 03:22:02 -0400 Received: from host81-138-11-136.in-addr.btopenworld.com (EHLO _10.0.0.4_) ([81.138.11.136]) by c2beaomr09.btconnect.com with ESMTP id CVC23518; Wed, 11 May 2011 08:21:16 +0100 (BST) Message-ID: <4DCA38E6.9020003@lsces.co.uk> Date: Wed, 11 May 2011 08:21:10 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.18) Gecko/20110320 SUSE/2.0.13-1.2 SeaMonkey/2.0.13 MIME-Version: 1.0 To: PHP internals References: <4DC729EE.9090600@sugarcrm.com> <4DC75FFF.40008@lerdorf.com> <4DC7A7F0.4000504@sugarcrm.com> <4DC819D0.5010008@lerdorf.com> <4DC81ED6.1050902@sugarcrm.com> <8757232E56758B42B2EE4F9D2CA019C9013F9F59@US-EX2.zend.net> <4DCA2192.4080201@lsces.co.uk> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mirapoint-IP-Reputation: reputation=Good-1, source=Queried, refid=tid=0001.0A0B0303.4DCA38E7.00A7, actions=tag X-Junkmail-Premium-Raw: score=7/50, refid=2.7.2:2011.5.11.60019:17:7.586, ip=81.138.11.136, rules=__MOZILLA_MSGID, __HAS_MSGID, __SANE_MSGID, __USER_AGENT, __MIME_VERSION, __TO_MALFORMED_2, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __CT, __CT_TEXT_PLAIN, __CTE, __ANY_URI, __URI_NO_MAILTO, __CP_URI_IN_BODY, BODY_SIZE_3000_3999, __MIME_TEXT_ONLY, RDNS_GENERIC_POOLED, BODY_SIZE_5000_LESS, RDNS_SUSP_GENERIC, RDNS_SUSP, BODY_SIZE_7000_LESS X-Junkmail-Status: score=10/50, host=c2beaomr09.btconnect.com X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A0B020C.4DCA38ED.00BB,ss=1,fgs=0, ip=0.0.0.0, so=2010-07-22 22:03:31, dmn=2009-09-10 00:05:08, mode=multiengine X-Junkmail-IWF: false Subject: Re: [PHP-DEV] annotations again From: lester@lsces.co.uk (Lester Caine) dukeofgaming wrote: > So, please stop saying "no" to every feature request that comes > in and > start to discuss the actual impact of each feature. > > > I think that MY only problem with you 'adding annotations because it > is missing' is simply that I've already been doing it for years - > just not calling it 'annotations' ... its 'documentation' and always > has been ... > > It is really troubling to read that statement. Seems there are still > some that don't really have a clue of what annotations are, even when > the RFC clearly links to them. Annotations ARE NOT documentation; in the > case of PHP, documentation is being used as annotations because there is > no language implementation, which exists in other languages (Java, .NET) > and they are widely used. Also, some use annotations as documentation > (e.g. store the class version), but again, annotations ARE NOT > documentation. Don't let the "@" notation shared with docblock fool you. > > Guilherme, I think its easy to assume that people already have some > sense of what annotations are, but perhaps the wiki entry could be more > educational about it?. The first time I read about annotations it was > from this link: > http://download.oracle.com/javase/tutorial/java/javaOO/annotations.html; > perhaps an intro like that could help to make the case for annotations > crystal clear?. But that aligns perfectly with my interpretation of 'annotations' - compiler time commands and control - but we do not compile - we run the files raw. It even say ... > Documentation > Many annotations replace what would otherwise have been comments in code. And I can't see why the @interface complexity can't simply be replaced with the existing docblock header which already has the same data contained. However that is only part of the picture and passing information on parameters is what I am seeing as the main use of annotation? ( this is probably going to wrap ) > /** > * registerPackageUpgrade > * > * @param array $pParams Hash of information about upgrade > * @param string $pParams[package] Name of package that is upgrading > * @param string $pParams[version] Version of this upgrade > * @param string $pParams[description] Description of what the upgrade does > * @param string $pParams[post_upgrade] Textual note of stuff that needs to be observed after the upgrade > * @param array $pUpgradeHash Hash of update rules. See existing upgrades on how this works. > * @access public > * @return void > */ > function registerPackageUpgrade( $pParams, $pUpgradeHash = array() ) { No doubt this could be automatically processed to to provide a java like view of the same information, but what am I missing here? The data is already contained in the code ... existing tools handle and display it ... but it is still easily edited and read by any existing user? Of cause doxygen requires a slightly different dialect to phpdoc, and THAT is something that it would be worth investigating, but that is a different problem. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php