Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83034 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56780 invoked from network); 18 Feb 2015 08:59:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Feb 2015 08:59:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:42370] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1F/E5-18888-F7454E45 for ; Wed, 18 Feb 2015 03:59:44 -0500 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id 92496E202E; Wed, 18 Feb 2015 08:59:37 +0000 (GMT) Date: Wed, 18 Feb 2015 08:59:37 +0000 (GMT) X-X-Sender: derick@whisky.home.derickrethans.nl To: Dmitry Stogov cc: PHP Internals , Nikita Popov , Guilherme Blanco , Pierrick CHARRON , Alexander Lisachenko , Pierre Joye , Zeev Suraski , Andi Gutmans , Joe Watkins , Yasuo Ohgaki , Sebastian Bergmann , Stanislav Malyshev , Rasmus Lerdorf In-Reply-To: Message-ID: References: User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-1499310130-1424249979=:5941" Subject: Re: [PHP-DEV] Annotations in PHP7 From: derick@php.net (Derick Rethans) --8323329-1499310130-1424249979=:5941 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 17 Feb 2015, Dmitry Stogov wrote: > On Mon, Feb 16, 2015 at 10:57 PM, Derick Rethans wrote: >=20 > > On Mon, 16 Feb 2015, Dmitry Stogov wrote: > > > > > hi, > > > > > > During discussion of different ways of implementing "Design by Contra= ct" > > we > > > got an idea of using annotations. > > > > > > BTW: annotations are useful by their own and may be used for differen= t > > > 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 annotati= ons > > in > > > PHP7 and how powerful they may be : > > > https://gist.github.com/dstogov/dbf2a8f46e43719bd2c2 > > > > Why didn't you pick the same syntax as hack? >=20 > It's not smart enough to be used for DbC, AOT and many other features (we > are going to capture AST). I realize that, but: could easily look like: <> The latter syntax <<=E2=80=A6>> is what Hack does, but you picked <=E2=80= =A6> - which=20 makes it both the same as HTML/XML tags *and* different from Hack. The=20 <=E2=80=A6> syntax also gets in the way of XHP=20 (https://github.com/facebookarchive/xhp-php5-extension) cheers, Derick --8323329-1499310130-1424249979=:5941--