Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92632 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71833 invoked from network); 22 Apr 2016 09:04:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Apr 2016 09:04:38 -0000 Authentication-Results: pb1.pair.com header.from=j.boggiano@seld.be; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=j.boggiano@seld.be; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain seld.be designates 74.125.82.42 as permitted sender) X-PHP-List-Original-Sender: j.boggiano@seld.be X-Host-Fingerprint: 74.125.82.42 mail-wm0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:36813] helo=mail-wm0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9F/EF-14036-529E9175 for ; Fri, 22 Apr 2016 05:04:38 -0400 Received: by mail-wm0-f42.google.com with SMTP id v188so12796723wme.1 for ; Fri, 22 Apr 2016 02:04:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seld-be.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=eIlfqWQx3AiAdElUFUu4gFsVO1iSpL4RFSen6qTvprw=; b=Ogo7idhluMHF9G4EQQV3AAvwR3VV5WcHGab2uLgY+93h+qGlqI/d/f0z6AsguCqJj4 Z8enJy+AbOdjRPu6D6L8gfvXdF6dDMLv3+JgBp3zbj7s39E+dXxzZm7OPYpHJg+g485w 8pJn3XNOh5oEOu7M+1saOI2eh42BqTe5fCoWVjVAJi2RUjESq6fuYas7o48tkRGksTY6 GWdxieTmLqPc9trWs8wqjG+ccFYSCju2KcNYAeEHv9kni6qhvDAlaiMludj5mfV7hJDk 1GZsEIM8knFjHx6Dl12x0QHUHkcPcqN1Jy7q3/7VC7HavrlNW5Cr1Cl/GncvnN2mL1bU HFlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=eIlfqWQx3AiAdElUFUu4gFsVO1iSpL4RFSen6qTvprw=; b=cwvNhawc0/bnbdbNuvvLrfbHKb+qiUqnHUr7CIdna1NXyf6MQiloYPYue6ymoLC1zQ 8x3Y69UP5WUO2veQRzLCXk6bxPo4LkJF7bkfwHLDfym0Xn9YKF/+KOfMjkdX6E9AkPV7 6g4JJyqNKp+8OZMKMQhYdbI+tHOOVLFYO0gOKGkraiehGjI4RbrZQ9pBELzAgd67q/eG AvRnKl27WqrmNmwck4AwMguWAkPyjNEAAzzN0N8fkBtOdimJpAdkx+CceSbDBRxyC8Qm 00FK3t26eop2cxEawlJuVyUfMoEOkHMrvN1HLkNbjyzgKGjfFco8DEAgRHhZPBrs/CCa AaAQ== X-Gm-Message-State: AOPr4FXjmQJiz1MH7EODLDjDXWJqKGmkhrCTFPv8dH4xL073nl/UOF5+T5DFhh2Zo8+X7w== X-Received: by 10.28.103.2 with SMTP id b2mr2582796wmc.66.1461315874888; Fri, 22 Apr 2016 02:04:34 -0700 (PDT) Received: from [192.168.0.2] (cpc74585-lewi13-2-0-cust978.2-4.cable.virginm.net. [82.25.75.211]) by smtp.googlemail.com with ESMTPSA id b124sm1579431wmb.1.2016.04.22.02.04.32 for (version=TLSv1/SSLv3 cipher=OTHER); Fri, 22 Apr 2016 02:04:33 -0700 (PDT) To: internals@lists.php.net References: <5719D016.10401@zend.com> Message-ID: <5719E92A.5040606@seld.be> Date: Fri, 22 Apr 2016 10:04:42 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <5719D016.10401@zend.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] PHP Attributes From: j.boggiano@seld.be (Jordi Boggiano) On 22/04/2016 08:17, Dmitry Stogov wrote: > > > On 04/22/2016 05:15 AM, Sara Golemon wrote: >> On Thu, Apr 21, 2016 at 2:13 PM, Dmitry Stogov wrote: >>> I would like to present an RFC proposing support for native annotation. >>> >> I'm trying to imagine where the benefit of non-constant expressions >> comes in. >> >> <> >> >> Assuming we roll in php-ast at the same time (which is a big addition, >> IMO, and deserves its own separate RFC), what are users meant to do >> with this? Even if there's a use-case here, one could accomplish the >> same thing with: >> >> <> >> >> And manually running that string into php-ast if that's what the >> caller wanted. > > Good point. It's really not a big deal to run > ast\parse_code($r->getAttributes()["foo"]) > This would simplify the implementation a bit. I can't speak for the implementation details, but I see a few benefits of having real AST vs a string.. You get syntax highlighting in editors, and most importantly compile time syntax errors if you messed up. Cheers -- Jordi Boggiano @seldaek - http://seld.be