Re: private, protected, readonly, public
| From: | Christian Schneider | Date: | Tue, 16 May 2006 23:08:02 +0000 |
| Subject: | Re: private, protected, readonly, public | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-23487@lists.php.net to get a copy of this message | ||
Marcus Boerger wrote:
i changed from readonly to readable, which means the new keyword makes it public for any read access, that is:So much for "readable" being obvious (i.e. you have to explain it).
private readable $abc; - class itself can read and write - public for everybody when reading, inside & outside of the class protected readable $abc; - class itself can read and write - sub-class can read and write - public for everybody when reading, inside & outside of the class public readable $abc; - just as public aloneDoes anyone apart from me wonder why we need to bloat the language for an obscure feature like this? Please take a step back, take a deep breath, count to 10 and that's *really* what the PHP community has been waiting for. Please don't extend PHP until it accepts something like final static private readable $x; because it could turn your brain into guacamole if you have to read code like that ;-) PS: If anyone wants me to write a patch or test for "readable": No problem, I can write a patch disallowing "readable" quite quickly and I'd even sit down to write a test failing if readable is allowed in declarations (-:C - Chris