Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69660 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43369 invoked from network); 18 Oct 2013 00:05:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Oct 2013 00:05:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 198.187.29.239 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 198.187.29.239 imap1-1.ox.registrar-servers.com Received: from [198.187.29.239] ([198.187.29.239:32942] helo=imap1-1.ox.registrar-servers.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 05/00-43111-A4B70625 for ; Thu, 17 Oct 2013 20:05:31 -0400 Received: from localhost (localhost [127.0.0.1]) by oxmail.registrar-servers.com (Postfix) with ESMTP id E0266200083 for ; Thu, 17 Oct 2013 20:05:27 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap1.ox.registrar-servers.com Received: from oxmail.registrar-servers.com ([127.0.0.1]) by localhost (imap1.ox.registrar-servers.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id F8ewgv1Eugq2 for ; Thu, 17 Oct 2013 20:05:27 -0400 (EDT) Received: from [192.168.0.200] (unknown [94.3.245.95]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by oxmail.registrar-servers.com (Postfix) with ESMTPSA id 75DEE200081 for ; Thu, 17 Oct 2013 20:05:27 -0400 (EDT) Message-ID: <52607B40.8060808@ajf.me> Date: Fri, 18 Oct 2013 01:05:20 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: PHP internals Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [RFC] Constant Scalar Expressions (re-opening) From: ajf@ajf.me (Andrea Faulds) Greetings, Unfortunately, as you will no doubt well be aware, Anthony Ferrara, aka ircmaxell, decided to cease contributing to PHP. This is not a matter I wish to discuss here, but it is relevant to the subject of this email. Because he left, he withdrew all the RFCs he authored. Since I like this RFC of his, I have decided to copy the content of it and the patch to new locations, and re-open it. The RFC, so far as I can tell, looks fairly complete as it stands. I am deciding to champion it because I think that such static expressions are useful for code readability. The intent of, for example, const TIME_PERIOD = 7 * 24 * 60 * 60; is much clearer than const TIME_PERIOD = 604800;, and there are other examples of how this could be useful. I have read through the previous mailing list discussion, and while I will admit that, yes, this RFC does not allow some possibilities that would be nice (like using constants in such expressions, for example), I think it is still quite useful and an improvement on the status quo. So far as I can tell, there are no remaining unanswered questions or unresolved issues with this, so if that is the case I would like to move this towards a vote fairly soon. The new RFC is here: https://wiki.php.net/rfc/const_scalar_expressions2 It is identical in content aside from a changed header and links. If this could be added to the list of RFCs Under Discussion that'd be great. Thank you for your time. -- Andrea Faulds http://ajf.me/