Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82817 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77809 invoked from network); 16 Feb 2015 11:22:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Feb 2015 11:22:41 -0000 Authentication-Results: pb1.pair.com header.from=cesar@rodas.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cesar@rodas.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain rodas.me designates 109.74.200.116 as permitted sender) X-PHP-List-Original-Sender: cesar@rodas.me X-Host-Fingerprint: 109.74.200.116 li147-116.members.linode.com Received: from [109.74.200.116] ([109.74.200.116:35906] helo=li147-116.members.linode.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/30-05176-FF2D1E45 for ; Mon, 16 Feb 2015 06:22:40 -0500 Message-ID: <54E1D2F8.30606@rodas.me> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rodas.me; s=mail; t=1424085755; bh=BP85XQs0XruZiKi/KlqoUV5f0eX+sy+KOLcGyjY8yUY=; h=Date:From:To:Subject:References:In-Reply-To:From; b=Rzo4r3oyJ3nIEm01ru4VSXVi8NEAxZ2lXKP0bopwlNHECTDJUZ3IJpfgA1kP0az5k V9aUdlXkGoVJxyKw8Tzc+W8zWJbkeNMYeyCXhpanJqBXCZSTwjMSMqe/OTy6i7OCbz cjb9wZMHn08wtCuvaAwZYEtfikvSx6mosxNgqY48= Date: Mon, 16 Feb 2015 12:22:32 +0100 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="F8c4aCjfBjf7nw6kLS37tKr7JqHf7rQbx" Subject: Re: [PHP-DEV] Re: Annotations in PHP7 From: cesar@rodas.me (Cesar Rodas) --F8c4aCjfBjf7nw6kLS37tKr7JqHf7rQbx Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 16/02/15 12:19, Dmitry Stogov wrote: > I decided to explain the proposed annotation syntax "in words" to avoid= > misunderstanding > > annotations ::=3D { annotation }. > annotation ::=3D '<' STRING '>' | '<' STRING '(' expr ')' '>'. > > where is regular PHP expression. Why not doc-block annotations? So it can be parse/understand that is already there (Doctrine annotations for instance). > > Thanks. Dmitry. > > > On Mon, Feb 16, 2015 at 2:07 PM, Dmitry Stogov wrote:= > >> hi, >> >> During discussion of different ways of implementing "Design by Contrac= t" >> we got an idea of using annotations. >> >> BTW: annotations are useful by their own and may be used for different= >> purposes. Support for annotations was proposed long time ago: >> >> https://wiki.php.net/rfc/annotations >> https://wiki.php.net/rfc/annotations-in-docblock >> https://wiki.php.net/rfc/reflection_doccomment_annotations >> >> HHVM already implemented similar concept >> >> http://docs.hhvm.com/manual/en/hack.attributes.php >> >> I made a quick and dirty PoC that shows how we may implement annotatio= ns >> in PHP7 and how powerful they may be : >> https://gist.github.com/dstogov/dbf2a8f46e43719bd2c2 >> >> The test there is self explainable. Of course, annotations just provid= e a >> way to add metadata, but doesn't define attribute names or the ways th= ey >> are going to be used. Only Reflection API to read. >> >> There are still a lot of technical problems that have to be solved. >> Right now, we just need to answer a question - if we like this in PHP7= ? >> Thought and opinions are welcome... >> >> Thanks. Dmitry. >> --=20 C=C3=A9sar D. Rodas Open Source developer +595-983-161124 PGP: F9ED A265 A3AB C8A1 D145 7368 158A 0336 C707 0AA6 --F8c4aCjfBjf7nw6kLS37tKr7JqHf7rQbx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJU4dL4AAoJEBWKAzbHBwqm3wAP/jIlQOnDaepjyCnw2xFwNrSs EZPKCOuNHe78ZNs5Ke+BzcxGUP5+hHFyignnhhNO5QuKmgV4nSkFFp4UtHd98RNw 1z6zqo9087acWkXABb1Za89/vReaXNSHnoPHlQ3+5a6VUvzjtgFfUmTiOsDSTVOj tOiMAupjSmBgaRQ5UzzptdK+ZHGBdTPzew0WY4+2yOO9p6X5XdmkIIBZD+eu3n8Y q5PyTWSeUl+qvjAhKZ60ZJIhGBOjv1OaRFfquJ0Izwttoaf8uDOmrnL2LS2EoPOy zJCI1s9wbbHCmE9OsootKJz/WGbWLEimnd1O0VV9/yhgB2LUvqryGpaCB4LYFCy7 ALIq1bFw78dVhwBc8PMDewppuzmbU2hf1lD8xhbq/aunmqpY8jhWYTWtssuug7y5 o0ncgUzNu437egWBFgFkwqqfTBov2AbllX3XJ97XuptJBP0nWBdWebA65zVsU+gP g0eL3qActhrMXgL7h2CUEfKa+8vooY7Zx5axjvi/1rcl8U03Fhllm8n9G6cwAHDU uI3qiGQIlzA3/j/gbv8q6Zj50+txEM6uab+ZoBklAQ7+JZFXvutwdzFdIf0AozOH OJnjjfAfaB391CaVvomScOePs0rNVNi0+r8j+th6BC/pR8AyUnf2R9tlnm+cDr5U VXu58L7AwkfHDzFdQoLO =mGkv -----END PGP SIGNATURE----- --F8c4aCjfBjf7nw6kLS37tKr7JqHf7rQbx--