hi Andrea, On Fri, Oct 24, 2014 at 6:36 AM, Andrea Faulds <a...@ajf.me> wrote: > Good evening once again, > > 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. > > Since I am a big proponent of including specification patches in new RFCs, I > have decided to put my money (or rather, time) where my mouth is and I have > actually written a specification patch before writing an RFC. I would love to > see this become the new standard for RFCs affecting the language. > > If you are curious at all about the behaviour, I suggest perusing the fairly > comprehensive set of twelve tests included in the main patch to php-src.
As much i really like the idea to have better properties management in PHP I see this RFC as an attempt to solve only part of the problem while dropping most of the other ideas implemented in the past RFCs. My take on that is that some will vote no, or won't like the idea of adding anything in this area. Making compromises and implement partial solutions will only delay the implementation of the complete solution. Many of us agree that __get/__set is a pain to deal with.The need of readonly, writeonly or properties with some logic to define or get a value is a lond due need. Many other languages support that out of the box since long already. Past RFCs, like the c# one, proposed that. I would rather focus on trying to find an acceptable syntax and implementation instead of doing baby steps like that. Baby steps work very well for scalar type hinting, solving one issue after another, etc. But for properties we are at the risk of hainvg a serie of separate RFCs solving the properties management problems in different ways bringing even more troubles and inconsistencies. Cheers, -- Pierre @pierrejoye | http://www.libgd.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php