> On 27 Oct 2014, at 18:31, Dmitry Stogov <dmi...@zend.com> 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. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php