Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82887 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34007 invoked from network); 16 Feb 2015 20:59:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Feb 2015 20:59:41 -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.220.173 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.173 mail-vc0-f173.google.com Received: from [209.85.220.173] ([209.85.220.173:38649] helo=mail-vc0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CF/4F-36518-C3A52E45 for ; Mon, 16 Feb 2015 15:59:40 -0500 Received: by mail-vc0-f173.google.com with SMTP id hy4so11368241vcb.4 for ; Mon, 16 Feb 2015 12:59:37 -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=RiM29Kl62vHkRagQa25F80wV0cxiXco1rtBYU7MjoDE=; b=nKirqlDhqTnpVH7uxgU5J1aIf5x25CFYJaHIjZKd63uGqu9kBJq1T7+yLSRrBWfcZh SUV6xB3A9NJD7nkKKj1Lmk/AyALBnb3etcX9soT+06eXH/F1F7v6W33wmbZmEvQrVLH0 smNahzMzMe9mxtPyUP6F9U/dWoRliobYj3eW2WRVBtC4IIdSE++t9WVstn8F+2RuZhVH /hgkZmTMyRxBvXh53gHO3y1bwdWbKjp5QGSD+ruwgA58tUVhjrvnrMCs2YHIeX6vUJHV 7RwWDdDvsdrvF7PCvzFmGLg8KLADiEBtKRORRxmYBalDg2sbXCiH5SlZl4SY03S1oldn hH8Q== X-Gm-Message-State: ALoCoQkNesryTnk9BCWKm6ZuGTYm97WO2xGOR1kuHWsz5H++UVGqpscByBYBPkFLMrpdHohVzSnRrgb/kSl+AaxI7k/jxI+VlsjK/xisJphmyRiMtHX+AY4R0eoPnu5w5VU1FgPHf9BIIDHF7FD3C6vcK5M5GiDPKw== MIME-Version: 1.0 X-Received: by 10.52.25.11 with SMTP id y11mr5900910vdf.51.1424120377743; Mon, 16 Feb 2015 12:59:37 -0800 (PST) Received: by 10.52.74.73 with HTTP; Mon, 16 Feb 2015 12:59:37 -0800 (PST) In-Reply-To: References: Date: Tue, 17 Feb 2015 00:59:37 +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=001a1133e5f23bb529050f3adde4 Subject: Re: [PHP-DEV] Annotations in PHP7 From: dmitry@zend.com (Dmitry Stogov) --001a1133e5f23bb529050f3adde4 Content-Type: text/plain; charset=UTF-8 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). Thanks. Dmitry. > cheers, > Derick > > -- > http://derickrethans.nl | http://xdebug.org > Like Xdebug? Consider a donation: http://xdebug.org/donate.php > twitter: @derickr and @xdebug > Posted with an email client that doesn't mangle email: alpine > --001a1133e5f23bb529050f3adde4--