Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111674 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 19205 invoked from network); 21 Aug 2020 22:06:25 -0000 Received: from unknown (HELO localhost.localdomain) (76.75.200.58) by pb1.pair.com with SMTP; 21 Aug 2020 22:06:25 -0000 To: internals@lists.php.net References: Date: Fri, 21 Aug 2020 23:08:24 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 46.59.72.204 Subject: Re: Should hash comments be deprecated? From: ajf@ajf.me (Andrea Faulds) Message-ID: Hi, Theodore Brown wrote: > Hi internals, > > Since the #[] attribute syntax is currently winning the vote, [1] > it makes me wonder if the use of comments starting with # should be > deprecated. > > Otherwise it seems like we could be setting ourselves up for long-term > confusion between attributes and comments, and also inconsistency with > other comments (it will no longer be safe to assume that a line can be > commented out by simply adding # at the beginning). > > What do others think? > > Theodore > > [1]: https://stv-results.theodorejb.me/php/?rfc=shorter_attribute_syntax_change > There is a critical use-case for comments beginning with the hash symbol, namely UNIX shebang lines. In theory we could special-case those and disallow the symbol in every other use, but… well, that seems like a bit of a shame. Regards, Andrea