Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50217 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42798 invoked from network); 16 Nov 2010 02:29:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2010 02:29:34 -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 209.85.161.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: 209.85.161.42 mail-fx0-f42.google.com Received: from [209.85.161.42] ([209.85.161.42:33393] helo=mail-fx0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 31/77-25603-C8CE1EC4 for ; Mon, 15 Nov 2010 21:29:33 -0500 Received: by fxm13 with SMTP id 13so109331fxm.29 for ; Mon, 15 Nov 2010 18:29:30 -0800 (PST) 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=/eYHG44fL/zN4WRvi5xu4f+Ulh/cREKhUDIr80DqSfs=; b=J2nllouPmWTwtAqBWpQsShaSj4QN3R0+HzYyqZ9StOoXI67ST3SMOtPM+gMz28kvPK 4QPwIlNQixJ9Z7Wyz7a3W1wJFwGI1EICUyOJI2WCZHqUiId8UnqjVff/FWu6YXooUKLK amezu7TOWCecK5EWZVXsXTjgxs7ksdLksrlp8= 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=c8IP8gfDb4iIw2VxF7OORFVh/wv1GUxQrZmw1qjHnklXBkFJ3Iwcduoxw1ySVBP6Me 9e3B+Op437SmnRgpNsHJB4hsSnoteSiLwog6Y+A1/P0JDYValb3OQ6UkkYX2y24Soq0D KFFtbkySnUdvEzeIpLdDlnbRohY+yoB6EeNvo= MIME-Version: 1.0 Received: by 10.223.78.139 with SMTP id l11mr5324607fak.31.1289874569931; Mon, 15 Nov 2010 18:29:29 -0800 (PST) Received: by 10.223.105.5 with HTTP; Mon, 15 Nov 2010 18:29:29 -0800 (PST) In-Reply-To: References: <887FE7CFF6F8DE4BB3A9535F53AFD06A2C59B588@il-ex2.zend.net> <887FE7CFF6F8DE4BB3A9535F53AFD06A2C59B6A0@il-ex2.zend.net> <0A.D4.25603.584D1EC4@pb1.pair.com> Date: Tue, 16 Nov 2010 00:29:29 -0200 Message-ID: To: Will Fitch Cc: Alec , internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) support discussion From: guilhermeblanco@gmail.com ("guilhermeblanco@gmail.com") @Will: Patch works perfectly with PHP 5.3. There is just a minor issue related to APC not caching instances. That patch didn't reach a consensus and that's why I opened a different thread to implement a patch based on poll results. Cheers, On Mon, Nov 15, 2010 at 10:55 PM, Will Fitch w= rote: > 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. =C2=A0I= know > the discussion was brought up a few weeks ago, but what are the objection= s > 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 j= ust >> do this: >> >> @xmlrpc({ >> =C2=A0 =C2=A0 =C2=A0 =C2=A0name : "server.getValue", >> =C2=A0 =C2=A0 =C2=A0 =C2=A0params : { >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0param1 : { >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0type : "number", >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0docs : "This is documentation for param1" >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} >> =C2=A0 =C2=A0 =C2=A0 =C2=A0} >> }); >> public getValForXMLRPC ($param) { >> ... >> >> I just used JSON for the syntax of annotation. I did this for two reason= s: >> 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. >>> =C2=A0Having WSDL auto-generation without compromising developer >>> documentation and attempting to have user-land code parse phpdoc for th= is >>> purpose seem{ed,s} counterintuitive. =C2=A0That said, introducing annot= ations >>> is >>> a HUGE undertaking and would require a ton of work with potentially lit= tle >>> return. =C2=A0I do think it would be worth looking into in a future maj= or >>> 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 >>> =C2=A0wrote: >>> >>> =C2=A0On Tue, Nov 16, 2010 at 12:39 AM, Zeev Suraski =C2= =A0wrote: >>>> >>>>> 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 > --=20 Guilherme Blanco Mobile: +55 (16) 9215-8480 MSN: guilhermeblanco@hotmail.com S=C3=A3o Paulo - SP/Brazil