Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83042 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75422 invoked from network); 18 Feb 2015 11:08:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Feb 2015 11:08:39 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.160.178 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.160.178 mail-yk0-f178.google.com Received: from [209.85.160.178] ([209.85.160.178:49322] helo=mail-yk0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D5/09-18888-4B274E45 for ; Wed, 18 Feb 2015 06:08:37 -0500 Received: by mail-yk0-f178.google.com with SMTP id 19so189165ykq.9 for ; Wed, 18 Feb 2015 03:08:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=b2HbG/Om6abEvoUcSPeKWDQjhvJ88y6GU2qlyt3ZQLA=; b=aP6AowqIbXKgw/CLGBT1zJjoX6xiiUA1FR4Bvb7tLpsngZywhUKCffRv+CA7zbkC9s bEdF2+8ySQ7OxEPQTAHsPLox13H7mmzupbVqsvurgPuk3amBifv71aqvU5kkgKHUbUZF +s4PvoROjmlyCMgV1P3O67u1WRzoMUDm4PfH2yMxJs/LaysmhlQMxhmQlJ+JhQs3ZZuk iRzLup1qy5SBxNzjlabNpdp4RdO8vFtTZAIjek9mTqfhenGZ5mzm4nNFcjlSWEAOpBH5 Wuwb6cXQnk8YJu/GI9V+YpRpd4TZlCn0WpmJFCQSTXX8WUoVynCUpOUlOiPXMSdIIJGi B+fw== X-Gm-Message-State: ALoCoQn/XPZrKKTNHjOfAgzq09JFKJUPg3PFR3se6yqmiG0N/IJEVd9CU/9g1or3IqhBvFHhyRcoEbnIbV1hzk5vFVXbt9kWMG7KbKLqRcwYy8hghoOQ/SOnBQqxdptl4Dt73gogTm3wvCGbqAb7EnEdx7hZM9v9Cw== MIME-Version: 1.0 X-Received: by 10.221.21.131 with SMTP id qs3mr21777432vcb.33.1424257714328; Wed, 18 Feb 2015 03:08:34 -0800 (PST) Received: by 10.52.74.73 with HTTP; Wed, 18 Feb 2015 03:08:34 -0800 (PST) In-Reply-To: References: Date: Wed, 18 Feb 2015 15:08:34 +0400 Message-ID: To: Derick Rethans 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 Content-Type: multipart/alternative; boundary=001a11339f8a21ac35050f5ad73a Subject: Re: [PHP-DEV] Annotations in PHP7 From: dmitry@zend.com (Dmitry Stogov) --001a11339f8a21ac35050f5ad73a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Feb 18, 2015 at 11:59 AM, Derick Rethans wrote: > On Tue, 17 Feb 2015, Dmitry Stogov wrote: > > > On Mon, Feb 16, 2015 at 10:57 PM, Derick Rethans wrote= : > > > > > On Mon, 16 Feb 2015, Dmitry Stogov wrote: > > > > > > > hi, > > > > > > > > During discussion of different ways of implementing "Design by > Contract" > > > 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 > annotations > > > in > > > > PHP7 and how powerful they may be : > > > > https://gist.github.com/dstogov/dbf2a8f46e43719bd2c2 > > > > > > Why didn't you pick the same syntax as hack? > > > > 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 > makes it both the same as HTML/XML tags *and* different from Hack. The > <=E2=80=A6> syntax also gets in the way of XHP > (https://github.com/facebookarchive/xhp-php5-extension) > > cheers, > Derick I don't care about decorators. If we come to vote I may add a separate question about <> vs <<>> Thanks. Dmitry. --001a11339f8a21ac35050f5ad73a--