Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78401 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83761 invoked from network); 27 Oct 2014 19:25:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Oct 2014 19:25:25 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.216 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.216 imap10-3.ox.privateemail.com Received: from [192.64.116.216] ([192.64.116.216:40777] helo=imap10-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F5/35-56216-52C9E445 for ; Mon, 27 Oct 2014 14:25:25 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 7211B2400DF; Mon, 27 Oct 2014 15:25:22 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap10.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap10.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id dbskg9DUr7Ft; Mon, 27 Oct 2014 15:25:22 -0400 (EDT) Received: from [10.128.235.166] (dab-rcn1-h-1-5.dab.02.net [82.132.245.233]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id A58362400D6; Mon, 27 Oct 2014 15:25:20 -0400 (EDT) References: <6E04B9BE-854E-4112-8C74-7D90BD8BFE95@ajf.me> Mime-Version: 1.0 (1.0) In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-ID: <6ADCA194-EB90-4EEB-BCBF-ADD5EAE855AA@ajf.me> Cc: PHP Internals X-Mailer: iPhone Mail (12B411) Date: Mon, 27 Oct 2014 19:25:05 +0000 To: Dmitry Stogov Subject: Re: [PHP-DEV] [RFC] Readonly Properties From: ajf@ajf.me (Andrea Faulds) > On 27 Oct 2014, at 18:31, Dmitry Stogov wrote: >=20 > Hi Andrea, >=20 > I don't have strong opinion about this proposal. > It doesn't make any harm to the engine, and it really may speed-up code es= pecially written for read-only properties. > On the other hand you introduce new orthogonal to private/protected/public= visibility rule, > and I'm not sure if this complication is good for language. >=20 > Why did you disable read-only static methods? (I just didn't get it). You couldn't really have a read-only method, there's no get/set equivalent f= or methods. The reason they're explicitly disallowed in the code is because,= to avoid shift/reduce conflicts, I have to add it as a member modifier but t= hen check the AST to see if it was used. The reason for disallowing static methods is we currently don't use separate= code paths for get/set of static methods, we just call one function to obta= in a pointer. Of course I could make that function be told whether it's for w= riting, I just hadn't done it yet. -- Andrea Faulds http://ajf.me/=