Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78686 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35151 invoked from network); 4 Nov 2014 21:31:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2014 21:31:22 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.67 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.67 smtp67.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.67] ([108.166.43.67:51101] helo=smtp67.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 65/A5-02095-9A549545 for ; Tue, 04 Nov 2014 16:31:22 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id D06FA3801A9; Tue, 4 Nov 2014 16:31:18 -0500 (EST) X-Virus-Scanned: OK Received: by smtp1.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 0F705380384; Tue, 4 Nov 2014 16:31:17 -0500 (EST) X-Sender-Id: smalyshev@sugarcrm.com Received: from Stass-MacBook-Pro.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net [108.66.6.48]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA) by 0.0.0.0:465 (trex/5.3.2); Tue, 04 Nov 2014 21:31:18 GMT Message-ID: <545945A5.2090204@sugarcrm.com> Date: Tue, 04 Nov 2014 13:31:17 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: "guilhermeblanco@gmail.com" , Andrea Faulds CC: Benjamin Eberlei , Pierre Joye , Levi Morrison , PHP internals , Larry Garfield References: <5457AF2F.90808@php.net> <5457BDB7.8070701@garfieldtech.com> <54589A8D.3020607@sugarcrm.com> <1C3F4FA3-ABD5-4F6F-A898-F63AC1C723D5@ajf.me> <54591A76.8070302@sugarcrm.com> <967E30E5-71CB-40F8-9AE2-733D327DE197@ajf.me> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Annotation PHP 7 From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Primarily, I do not see docblocks as the right place to store class' metadata information. Metadata != Comments. I personally regard this as a kind of superstition. There's nothing wrong with extending what can be in comments. In fact, Javascript was officially "HTML comment" for years, and it didn't prevent anybody from using Javascript. There are instances of significant comments in various environments. Outright refusing comments can be significant is just arbitrarily limiting our options for no reason. I don't say it necessarily the best option, but we should not reject it because "oh noes, significant comments!". It has been done, and it's nothing special, just one of the possibilities > This brings the next piece of the puzzle. We have to update lexical and > semantical understanding of PHP. Taking Java's approach (@) does not > work in PHP, because it conflicts with error supression. Same thing Except for the mental context, how @ conflicts with errors? Suppression is always in runtime context and applied to expressions, annotations are always outside of it and apply to declarations. Unless of course you want to annotate variables and closures, but I'm not sure annotating expressions is such a good idea anyway. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/