Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89455 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58261 invoked from network); 26 Nov 2015 17:19:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Nov 2015 17:19:51 -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 Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.178 as permitted sender) X-PHP-List-Original-Sender: guilhermeblanco@gmail.com X-Host-Fingerprint: 209.85.214.178 mail-ob0-f178.google.com Received: from [209.85.214.178] ([209.85.214.178:36124] helo=mail-ob0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 36/14-35358-63F37565 for ; Thu, 26 Nov 2015 12:19:50 -0500 Received: by obdgf3 with SMTP id gf3so67418767obd.3 for ; Thu, 26 Nov 2015 09:19:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=hkg1i0BtPXDGRp4hENNCOL20/hfP7lDikP2H/NtG+qQ=; b=KS96jP3V4QkawWD/pf0tepKShopfo+nGHwWbPICiVs5BOsZxfHagTG8fil/mJP+a7J aw3/k+5/cMfaX+i6NUlc4jOdbhMaOrpWWPigKw6M+XVMhBgMVxFqHwIJWD34zbILETk9 G1/9V/uVx9M3Idyu7BSvoff/J1chGa9WhPIeGk2WBeep9lKefb6K4YF+kYHQThp/4VME Fpq0aJRHFiMsi/fNXrTAf+8OduUZPjjZQk/cPSGGfrvYInHVxgEu8B7s3ukn1Rqezn5J 4r9IjD9jcFCgyi8wsz+ZvipmV7+AZAExlBCjImDoU7IL+xfuy/h5of4c2hNFPCz0MQdF /kww== X-Received: by 10.60.15.131 with SMTP id x3mr28738490oec.74.1448558387803; Thu, 26 Nov 2015 09:19:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.202.80.215 with HTTP; Thu, 26 Nov 2015 09:19:28 -0800 (PST) In-Reply-To: References: <5655D82A.8020304@lsces.co.uk> <5655E4E4.8070200@garfieldtech.com> <5655E61E.3000904@gmail.com> <5655E93F.90506@gmail.com> <5655F24B.6020401@garfieldtech.com> <5655F47C.3060504@gmail.com> <1B1E6CD7-2378-43CA-A636-83383707AF8E@gmail.com> <56572AEE.9030407@gmail.com> Date: Thu, 26 Nov 2015 12:19:28 -0500 Message-ID: To: Chris Riley Cc: Rowan Collins , PHP internals Content-Type: multipart/alternative; boundary=089e015365e6243c87052574c82b Subject: Re: [PHP-DEV] Native Annotation Syntax From: guilhermeblanco@gmail.com ("guilhermeblanco@gmail.com") --089e015365e6243c87052574c82b Content-Type: text/plain; charset=UTF-8 Answers inline On Thu, Nov 26, 2015 at 11:58 AM, Chris Riley wrote: > > On 26 November 2015 at 16:05, guilhermeblanco@gmail.com < > guilhermeblanco@gmail.com> wrote: > >> Ok then. I'll pretend that lack of interest didn't happen many other >> situations (like http://marc.info/?t=144608767800001) and move on. >> >> I don't want to bring the patch up to date/simplify it without a clear >> decision of at least be willing to discuss the patch and not reject by all >> means. >> I'd propose a voting as "Are you ready for Annotations yet?". Every core >> developer understands (and can base their decisions) by looking at the >> complexity of the old patch. >> >> Once voting completes and IF it gets approved, I'll gladly put it up to >> date for consideration and update the RFC. >> >> []s, >> >> On Thu, Nov 26, 2015 at 10:53 AM, Rowan Collins >> wrote: >> >> > guilhermeblanco@gmail.com wrote on 26/11/2015 15:14: >> > >> >> I haven't seen any user asking for traits >> >> >> > >> > Just because you didn't see it, doesn't mean it didn't happen. >> > >> > I just did a very quick search on Google for php + mixins, limited to >> 2007 >> > or earlier (long before the current Trait implementation was born), and >> got >> > plenty of results lamenting the lack of support for horizontal reuse in >> PHP. >> > >> > See for yourself: >> > >> https://encrypted.google.com/search?q=php+%22horizontal+reuse%22&safe=active&hl=en&source=lnt&tbs=cdr%3A1%2Ccd_min%3A%2Ccd_max%3A12%2F31%2F2007&tbm=#safe=active&hl=en&tbs=cdr:1%2Ccd_max:12%2F31%2F2007&q=php+mixins >> > >> > It's a common accusation of projects like this that time was spent on X >> > that should have been spent on Y, but that's nearly always a massive >> > over-simplification. >> > >> > Let's not spend too much time worrying if specific people are >> interested - >> > they may just be on holiday, or busy elsewhere, or just not have much to >> > say until someone assembles a few more details about the proposed >> feature. >> > Keep it constructive, lay out how you think the feature should look and >> > why, what questions are still open, and see what's needed to move it >> > forward. >> > >> > >> > Regards, >> > -- >> > Rowan Collins >> > [IMSoP] >> > >> > -- >> > PHP Internals - PHP Runtime Development Mailing List >> > To unsubscribe, visit: http://www.php.net/unsub.php >> > >> > >> >> >> -- >> Guilherme Blanco >> MSN: guilhermeblanco@hotmail.com >> GTalk: guilhermeblanco >> Toronto - ON/Canada >> > > Given that a lot of userland people have voting rights; I would suspect > that an annotations rfc would pass, provided it met the needs of these > users. As far as docblocks vs native goes - you've convinced me that native > would be best, previously I'd have been more in favour of adding a > getAnnotations method to ReflectionClass/Method/Property, to pull in > annotations from docblocks. > > I'd like to see this goto a new RFC here are some questions though: > > - Can annotations be applied to functions? > Yes, classes, interfaces, traits, methods, properties, functions. Unfortunately we can't apply to namespaces as they don't exist after compile time. > - Class constants? > No, there's no Reflection data structure around them and imposing one would be a serious BC break > - Should annotations be a special type eg annotation Foo{} or just a class? > Annotation classes would be annotated with @Annotation and their corresponding @Target (where they could be applied). > - Do we want to add decorator support at the same time? ( > http://thecodeship.com/patterns/guide-to-python-function-decorators/) > No. Annotations by itself is already a big endeavor and including more stuff would only make it harder to implement/digest/approve. What if Annotation gets approved, but people want decorator out? More work... Nothing prevent us to make a subsequent RFC to support decorators if the first one gets accepted. Regards, -- Guilherme Blanco MSN: guilhermeblanco@hotmail.com GTalk: guilhermeblanco Toronto - ON/Canada --089e015365e6243c87052574c82b--