Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49517 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92791 invoked from network); 25 Aug 2010 15:59:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Aug 2010 15:59:31 -0000 Authentication-Results: pb1.pair.com header.from=pierrick@webstart.fr; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=pierrick@webstart.fr; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain webstart.fr from 209.85.160.170 cause and error) X-PHP-List-Original-Sender: pierrick@webstart.fr X-Host-Fingerprint: 209.85.160.170 mail-gy0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:37345] helo=mail-gy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 48/1A-43011-2ED357C4 for ; Wed, 25 Aug 2010 11:59:31 -0400 Received: by gyd10 with SMTP id 10so340820gyd.29 for ; Wed, 25 Aug 2010 08:59:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.90.75.20 with SMTP id x20mr5775761aga.145.1282751966624; Wed, 25 Aug 2010 08:59:26 -0700 (PDT) Received: by 10.90.103.7 with HTTP; Wed, 25 Aug 2010 08:59:26 -0700 (PDT) In-Reply-To: References: Date: Wed, 25 Aug 2010 11:59:26 -0400 Message-ID: To: Benjamin Eberlei Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Annotation RFC + Patch From: pierrick@webstart.fr (Pierrick Charron) One of the advantage of classes vs array is that you have to create the class and define its structure and behaviour before using it. For example you cannot do with Array something like the [Inherited] annotation : [Inherited] class SampleAnnotation extends ReflectionAnnotation {} How could you define that the SampleAnnotation annotation is Inherited or not if you define it on the fly ? Pierrick 2010/8/25 Benjamin Eberlei : > > Hi Pierrick, > > Awesome RFC! :) I think this is a really useful addition on many levels. > > We had a chat about this yesterday, i just wanted to throw it into the > discussion here again: > > I think a solution where "->getAnnotations()" returns only an array of the > annotations data is simpler to use. > Validation of the data would have to be done by the user in this case, but > you could of course > add a layer in PHP that transforms this data into an object structure. > > greetings, > Benjamin > > On Wed, 25 Aug 2010 08:56:53 -0400, Pierrick Charron > > wrote: >> Hello PHP Internals! >> >> Recently a RFC was included on the PHP Wiki[1]. >> I know there've been a lot of buzz related to PHP 5.4, but this is not >> the subject of this email. >> >> I'm here to propose a new feature in PHP: Annotations. >> A patch is already available with 54 tests for the moment[2]. >> >> I worked together with Guilherme Blanco to make this support happen in >> a fresh PHP SVN trunk checkout. >> Please review, comment and provide feedback! I think it's a very >> useful support and may benefit users a lot. >> >> [1] http://wiki.php.net/rfc/annotations >> [2] http://www.adoy.net/php/Annotations.diff >> >> Regards, >> Pierrick >> >> (Sorry if you receive this message twice but it looks like I have >> problems with the ML) > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >