Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50214 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28455 invoked from network); 16 Nov 2010 00:55:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2010 00:55:49 -0000 Authentication-Results: pb1.pair.com header.from=will.fitch@quepasacorp.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=will.fitch@quepasacorp.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain quepasacorp.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: will.fitch@quepasacorp.com X-Host-Fingerprint: 209.85.215.42 mail-ew0-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:44349] helo=mail-ew0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AA/35-25603-496D1EC4 for ; Mon, 15 Nov 2010 19:55:48 -0500 Received: by ewy1 with SMTP id 1so42789ewy.29 for ; Mon, 15 Nov 2010 16:55:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.213.33.200 with SMTP id i8mr6143676ebd.55.1289868944495; Mon, 15 Nov 2010 16:55:44 -0800 (PST) Received: by 10.213.112.130 with HTTP; Mon, 15 Nov 2010 16:55:44 -0800 (PST) In-Reply-To: <0A.D4.25603.584D1EC4@pb1.pair.com> References: <887FE7CFF6F8DE4BB3A9535F53AFD06A2C59B588@il-ex2.zend.net> <887FE7CFF6F8DE4BB3A9535F53AFD06A2C59B6A0@il-ex2.zend.net> <0A.D4.25603.584D1EC4@pb1.pair.com> Date: Mon, 15 Nov 2010 18:55:44 -0600 Message-ID: To: Alec Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=0015174c1bce3e5348049521047c Subject: Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) support discussion From: will.fitch@quepasacorp.com (Will Fitch) --0015174c1bce3e5348049521047c Content-Type: text/plain; charset=ISO-8859-1 Wow. I should actually look at the RFCs more frequently. I have to say, assuming the patch is valid for PHP 5.3 (which I have no doubt it is), I don't see why this can't be taken more seriously. I know the discussion was brought up a few weeks ago, but what are the objections to injecting this functionality into the next major post-5.4 release? On Mon, Nov 15, 2010 at 6:47 PM, Alec wrote: > The patch is already written and a RFC created by Guilherme: > http://wiki.php.net/rfc/annotations . > > I personally think annotations could make a *great* addition to PHP. > > I agree with Will that annotations are especially useful for SOAP and > XML-RPC. I personally think annotations are useful for APIs in general. > > Instead of creating a method to respond to a XML-RPC call, then binding it > to a specific XML-RPC call with a line in the initialization you could just > do this: > > @xmlrpc({ > name : "server.getValue", > params : { > param1 : { > type : "number", > docs : "This is documentation for param1" > } > } > }); > public getValForXMLRPC ($param) { > ... > > I just used JSON for the syntax of annotation. I did this for two reasons: > 1. most PHP developers can write some Javascript, and 2. since this is > supposed to avoid syntax discussions, I used a syntax no one uses for > annotations, but everyone understands. > > The possibilities are endless with Annotations and as long as they are > pretty speedy I think they would be picked up quite quickly and we would get > some great examples from the community. > > My 2 cents. > > -Alec > > > On 11/15/2010 6:54 PM, Will Fitch wrote: > >> I have certainly wanted them many times - especially when using SOAP. >> Having WSDL auto-generation without compromising developer >> documentation and attempting to have user-land code parse phpdoc for this >> purpose seem{ed,s} counterintuitive. That said, introducing annotations >> is >> a HUGE undertaking and would require a ton of work with potentially little >> return. I do think it would be worth looking into in a future major >> release, but there are quite a few other things that would be more >> beneficial to the community for immediate discussions. >> >> Did anyone write and RFC on this? guilhermeblanco has a good start. >> >> On Mon, Nov 15, 2010 at 5:44 PM, Pierre Joye >> wrote: >> >> On Tue, Nov 16, 2010 at 12:39 AM, Zeev Suraski wrote: >>> >>>> Suggesting phpdoc is used for the purposes mentioned does not mean we >>>> >>> don't understand what we're talking about. >>> >>> I feel like you never used annotations in other languages, did you? >>> >>> Cheers, >>> -- >>> Pierre >>> >>> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org >>> >>> -- >>> PHP Internals - PHP Runtime Development Mailing List >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >>> >>> >> >> > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Thanks, Will Fitch Director of Operations | Quepasa.com 931.205.8242 | will.fitch@quepasacorp.com Twitter: twitter.com/willfitch --0015174c1bce3e5348049521047c--