Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64619 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83908 invoked from network); 7 Jan 2013 00:22:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jan 2013 00:22:28 -0000 Authentication-Results: pb1.pair.com header.from=g.b.yahav@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=g.b.yahav@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.54 as permitted sender) X-PHP-List-Original-Sender: g.b.yahav@gmail.com X-Host-Fingerprint: 209.85.219.54 mail-oa0-f54.google.com Received: from [209.85.219.54] ([209.85.219.54:39193] helo=mail-oa0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B8/41-12349-3451AE05 for ; Sun, 06 Jan 2013 19:22:27 -0500 Received: by mail-oa0-f54.google.com with SMTP id n9so16879846oag.41 for ; Sun, 06 Jan 2013 16:22:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=7ZjvtpA9hI8jvhxugl02kamyrJa1yaRHFAMcFc0Ev4w=; b=0tRQxj7akMy5/u28xiqzAdjN/A+uBvG8EbMmTsKDTv7jUVqslX8SDvzadvcQigoP13 K6WEZCtFv2XSKW21TQLvcFDJwTWQnL0rBox6PEuGtrmqZt+wZO5nIb4AJ5qgg27k9DTj vRbiM4SQtU71SZpPuWC/An3/ONo0S/mVmYzd+grtI2oBvRC0XFksMM5+U8CFZK7TnbYT 4CDCNsDbBp5b6FHGWERuG/IlT4dOo/BFpUyIUef9atn6BYpBGUf6UG5vCSGKpySU/IT4 AusEsaWjJB+RI43xxepTyzfrZs/dVDOjlKC/U3eIhYLla0lyUXPjlFwmlN5CaZeiexN0 KS2A== Received: by 10.182.42.97 with SMTP id n1mr42108982obl.91.1357518144248; Sun, 06 Jan 2013 16:22:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.76.151.4 with HTTP; Sun, 6 Jan 2013 16:22:04 -0800 (PST) In-Reply-To: References: Date: Mon, 7 Jan 2013 02:22:04 +0200 Message-ID: To: Clint Priest Cc: PHP internals Content-Type: multipart/alternative; boundary=14dae93998ebc39a0f04d2a7d254 Subject: Re: [PHP-DEV] [RFC] Reflection annotations reader From: g.b.yahav@gmail.com (Yahav Gindi Bar) --14dae93998ebc39a0f04d2a7d254 Content-Type: text/plain; charset=ISO-8859-1 This is attributes. I saw proposal for attributes that was declined. I think that the language should contain attributes, but because the lack of them the Annotations, which's currently used by some FW can be a great addition. To tell the troth, even if attributes was implemented in PHP, since the doc-comment is being used in applications, I think that adding annotations to the Reflection class can be great anyway. It can be handy in case there's attributes, for example, to create documentation of functions etc. On Mon, Jan 7, 2013 at 2:16 AM, Clint Priest wrote: > Just a thought on this, some other languages support attributes which is > similar but could also allow the engine to use them for things. As a quick > example (roughly based on what I've seen in c#) but applied to PHP use case: > > class a { > [$date(Nullable)] > public function foo(DateTime $date) { ... } > } > > -Clint > > On Jan 6, 2013, at 3:58 PM, Yahav Gindi Bar wrote: > > > Hi internals! > > > > In one of the discussions (about the "deprecated" keyword, to be > specific), > > it was been said that adding ability to read doc-comment annotation could > > be handy. Personally, I really think it can be great. > > > > So, I've created an RFC that propose to improve the Reflection extension > by > > adding the ability to read annotations decorated in the doc-comment. > > > > https://wiki.php.net/rfc/reflection_doccomment_annotations > > > > What is your opinion about this? > > > > Regards, > > Yahav. > --14dae93998ebc39a0f04d2a7d254--