Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64437 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32598 invoked from network); 26 Dec 2012 15:48:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Dec 2012 15:48:20 -0000 X-Host-Fingerprint: 84.177.155.112 p54B19B70.dip.t-dialin.net Received: from [84.177.155.112] ([84.177.155.112:4920] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/10-31048-34C1BD05 for ; Wed, 26 Dec 2012 10:48:19 -0500 Message-ID: To: internals@lists.php.net Date: Wed, 26 Dec 2012 16:48:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 References: <8D.41.07178.7380BD05@pb1.pair.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 84.177.155.112 Subject: Re: [PHP-DEV] RFC: Add a deprecated modifier for functions From: dev@pp3345.de (Yussuf Khalil) Hello, assuming that you are referring to the RFC about annotations (https://wiki.php.net/rfc/annotations) I don't think that annotations are needed in PHP. Declarations that actually have an impact on the language itself (like deprecated) should rather be implemented as function modifiers while annotations with simple information (like ) can also be stored in the doc comment (as @author Mr. X). However, I see that Reflection methods like getAnnotation() and hasAnnotation() can be useful sometimes. We could implement methods that fetch information from the doc comment for these cases, for example getDocTag($name) and hasDocTag($name). > On Wed, Dec 26, 2012 at 4:22 PM, Yussuf Khalil wrote: > >> Hello, >> >> I have created an RFC about adding a deprecated modifier for functions in >> PHP, see https://wiki.php.net/rfc/**deprecated-modifier. >> What are your thoughts on this? >> >> Thank you, >> Yussuf Khalil >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > Hi! > I think the idea of marking functions as deprecated is great and the > current way of throwing E_DEPRECATED error by trigger_error can be > improved. In the current state. > > That's being said, I don't think that adding a deprecated keyword is the > solution, since now we can write documentation and set a "@deprecated" mark. > I think, that the best solution is the attributes concept that was rejected > before and should be re-considered after the last releases changes and > language improvements. > A few built in attributes, such as can be great. > > What do you think? >