Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49518 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94585 invoked from network); 25 Aug 2010 16:04:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Aug 2010 16:04:32 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierrick@webstart.fr; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=pierrick@webstart.fr; sender-id=unknown Received-SPF: error (pb1.pair.com: domain webstart.fr from 74.125.83.42 cause and error) X-PHP-List-Original-Sender: pierrick@webstart.fr X-Host-Fingerprint: 74.125.83.42 mail-gw0-f42.google.com Received: from [74.125.83.42] ([74.125.83.42:65360] helo=mail-gw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B5/7A-43011-01F357C4 for ; Wed, 25 Aug 2010 12:04:32 -0400 Received: by gwb19 with SMTP id 19so350760gwb.29 for ; Wed, 25 Aug 2010 09:04:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.90.36.8 with SMTP id j8mr5775239agj.163.1282752251887; Wed, 25 Aug 2010 09:04:11 -0700 (PDT) Received: by 10.90.103.7 with HTTP; Wed, 25 Aug 2010 09:04:11 -0700 (PDT) In-Reply-To: <20100825132918.GA27628@mig9.immomigsa.ch> References: <20100825132918.GA27628@mig9.immomigsa.ch> Date: Wed, 25 Aug 2010 12:04:11 -0400 Message-ID: To: Pierrick Charron , internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Annotation RFC + Patch From: pierrick@webstart.fr (Pierrick Charron) Hi Etienne, 2010/8/25 Etienne Kneuss : > On Aug 25 =A08:56:53, 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 > > Quite interresting RFC! However, I've a few concerns/questions: > > 1) The new limitted syntax (esp. the field assignation). IMO this should > be extended to support more/all expressions. What kind of syntax would you like to add ? Right now you can add common static variables, array and Annotations. > > 2) How does it create the annotation? will it call __construct? If so, > Foo("asd") should defeinitely map to a constructor call, and the field > assignation should be discarded unless we have named parameters. Since php does not support named parameter the __construct is called with an array as parameter [Foo("bar", baz=3D"baz)] will call __construct(array("value" =3D> "bar", "baz" =3D> "baz)); > > 3) What is the purpose of an aliased name? Aliased name ? > > Best, > >> >> 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 >> > > -- > Etienne Kneuss >