Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78402 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85787 invoked from network); 27 Oct 2014 19:47:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Oct 2014 19:47:35 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.214.173 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.214.173 mail-ob0-f173.google.com Received: from [209.85.214.173] ([209.85.214.173:37651] helo=mail-ob0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 35/95-56216-651AE445 for ; Mon, 27 Oct 2014 14:47:35 -0500 Received: by mail-ob0-f173.google.com with SMTP id wn1so1902435obc.32 for ; Mon, 27 Oct 2014 12:47:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=YNIZ+Dxv9klazGiK8C6Tmu9AEfoWKxtO6Csqcherh2g=; b=Fb5CL908Dwyvy4m3Vo5LNeNh09M7NAl5IkmvJ92VZ7Y6FMX/x+qbtKpd7ycEXUoDea JmHyPIR9g2i5dz3tOZZa3xYxcq0pl7qp7pB7OsF5fpz7FBGiRqem+Fyc7eSZcEekgyEB dqRFntGMNT3ep9eSuBVSK+mtynAcncBFAlmNl/Kk8wOPQtIEjsZwb9bPfk7MOpmRqboR DCKrhBAwAjMoFD+nFzNkB3VAYRGzyXb0qfIs/p1WTYiqPT0GJOlK4e+O4t4quuRpwM9K XEto1uhS7E5h4RLYro//ekq08dGaE0LFBPEV1n8sHizpOUSVw8U7ZHtpofHUcaBo01J7 5nuw== X-Gm-Message-State: ALoCoQngKKWuVahZ9ufdqNC/WQbHpK+TFsfc4J5gGKg5moDPqgTrnLmc2iuVnBGDrR/Wqs3CQgb8aX/Q6gCnyozwwyOmZrSii4ThrY9BrEv50bkYZMNcjHl0MqyXgivyAcHYh0EGuWiu1T70N9/5C7PjjO/ag6N9WA== MIME-Version: 1.0 X-Received: by 10.182.125.3 with SMTP id mm3mr21792386obb.7.1414439251598; Mon, 27 Oct 2014 12:47:31 -0700 (PDT) Received: by 10.60.70.41 with HTTP; Mon, 27 Oct 2014 12:47:31 -0700 (PDT) In-Reply-To: <6ADCA194-EB90-4EEB-BCBF-ADD5EAE855AA@ajf.me> References: <6E04B9BE-854E-4112-8C74-7D90BD8BFE95@ajf.me> <6ADCA194-EB90-4EEB-BCBF-ADD5EAE855AA@ajf.me> Date: Mon, 27 Oct 2014 23:47:31 +0400 Message-ID: To: Andrea Faulds Cc: PHP Internals Content-Type: multipart/alternative; boundary=089e01229ea825f9f405066ccd00 Subject: Re: [PHP-DEV] [RFC] Readonly Properties From: dmitry@zend.com (Dmitry Stogov) --089e01229ea825f9f405066ccd00 Content-Type: text/plain; charset=UTF-8 On Mon, Oct 27, 2014 at 10:25 PM, Andrea Faulds wrote: > > > On 27 Oct 2014, at 18:31, Dmitry Stogov wrote: > > > > Hi Andrea, > > > > 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 > especially 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. > > > > 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 > for 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 then 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 obtain a pointer. Of course I could make that function be told > whether it's for writing, I just hadn't done it yet. > Oh. I meant static properties, of course. (zend_compile.c line 4219) Thanks. Dmitry. > > -- > Andrea Faulds > http://ajf.me/ > --089e01229ea825f9f405066ccd00--