Hi! > Here’s another RFC: https://wiki.php.net/rfc/readonly_properties > > It proposes, with a working implementation, a modifier for properties that > makes them readable and writeable from different scopes.
For me, this seems both too big and too small. Too small, because if you really it assigns a keyword to special use case of a generic feature, and thus I think does not lead us on the right path - we could not assign keywords to every behavior of properties, so either we forever reject the idea of having any generic solution there, or we'd eventually have two solutions, working in two different ways. Too big because this particular case is already very easy to implement by just making the property protected and having a public getter. It doesn't add any capability that we already don't have, and having a keyword just to save typing () seems unnecessary to me (performance is really irrelevant here, if your performance is bound by speed of accessors, you should be writing that code in C). Also, the name "readonly" appears misleading as it's not really read only - it's only read only for some classes, but writeable for others. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php