Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82826 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95250 invoked from network); 16 Feb 2015 12:07:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Feb 2015 12:07:40 -0000 Authentication-Results: pb1.pair.com header.from=lisachenko.it@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=lisachenko.it@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.180 as permitted sender) X-PHP-List-Original-Sender: lisachenko.it@gmail.com X-Host-Fingerprint: 209.85.212.180 mail-wi0-f180.google.com Received: from [209.85.212.180] ([209.85.212.180:61170] helo=mail-wi0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C1/00-29513-B8DD1E45 for ; Mon, 16 Feb 2015 07:07:39 -0500 Received: by mail-wi0-f180.google.com with SMTP id h11so25759263wiw.1 for ; Mon, 16 Feb 2015 04:07:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=jvj209e5YbSS+ChC11V/mAiFqM9acx/Sp+z0qGLrikM=; b=ITKuWIDaFxKng0cK/Ozt0rzsZHuwVyw6VCMcIp+GHrAGh9WVy8rTRvkXCp1tUcUydm dzTY6CsCTmc8csA4tfmbB0iOY3JSNuvNS/44vGSzX0LYNmi4VYMpmriiYosOqP8CKNRd pq+DmF5p7kYChJ6jLuI4jGVC81bd8rfwxsi6ucUxXvaSmjfcn/0kPkDVVg/u/WMv8OBU 0/HF0nQIa08/7LRo6O2B17WjIuwqnIoNsuqZGZcL5cnE9Ojocv5x3BpbJ/qFlzBz0ZHF ls9lxvo3ZZDHOOB//GXpmNXBL4oC7I/AKMRG9T0Daffx0cfh89MoRLsf/JAWTCdJpp7Q vBrQ== MIME-Version: 1.0 X-Received: by 10.194.71.110 with SMTP id t14mr50339258wju.58.1424088456750; Mon, 16 Feb 2015 04:07:36 -0800 (PST) Received: by 10.194.154.229 with HTTP; Mon, 16 Feb 2015 04:07:36 -0800 (PST) In-Reply-To: References: Date: Mon, 16 Feb 2015 15:07:36 +0300 Message-ID: To: Dmitry Stogov Cc: PHP Internals , Nikita Popov , Guilherme Blanco , Pierrick CHARRON , Pierre Joye , Zeev Suraski , Andi Gutmans , Joe Watkins , Yasuo Ohgaki , Sebastian Bergmann , Stanislav Malyshev , Rasmus Lerdorf Content-Type: multipart/alternative; boundary=047d7bfd0bd697eaea050f336ea8 Subject: Re: Annotations in PHP7 From: lisachenko.it@gmail.com (Alexander Lisachenko) --047d7bfd0bd697eaea050f336ea8 Content-Type: text/plain; charset=UTF-8 2015-02-16 14:19 GMT+03:00 Dmitry Stogov : > annotations ::= { annotation }. > annotation ::= '<' STRING '>' | '<' STRING '(' expr ')' '>'. > > where is regular PHP expression. Hello! Really like this syntax, actually you steal my thoughts )) I want to call this metadata, not an annotations. Just key-value storage for any top-level elements (namespaces, classes, functions, methods, properties, etc). Value can by anything, acceptable by PHP parser, then it will be possible to provide an API to get this AST node "as-is" and to add a logic layer on top of this. (I'm still waiting for the RFC karma) For annotations, it should be possible to use <> constant. Additionally, nested metadata should be supported. Thanks! --047d7bfd0bd697eaea050f336ea8--