Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23510 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52600 invoked by uid 1010); 17 May 2006 07:23:57 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 52584 invoked from network); 17 May 2006 07:23:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 May 2006 07:23:57 -0000 X-Host-Fingerprint: 195.225.34.5 fw01.axit.nl Received: from ([195.225.34.5:19253] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id BE/1A-19568-C8FCA644 for ; Wed, 17 May 2006 03:23:56 -0400 Message-ID: To: internals@lists.php.net References: <785810036.20060511193536@ionzoft.com> <44647B7A.2070301@php.net> <932738738.20060513112734@marcus-boerger.de> <837405862.20060513223403@ionzoft.com> <36828701.20060514110529@marcus-boerger.de> <31269879.20060514221212@marcus-boerger.de> <1327845846.20060514222154@marcus-boerger.de> <1562034641.20060516203354@marcus-boerger.de> <7.0.1.0.2.20060516235201.090f10a8@zend.com> <7.0.1.0.2.20060516142654.02c78380@zend.com> <596643859.20060516233753@marcus-boerger.de> <7.0.1.0.2.20060516144030.039abe98@zend.com> <1531743211.20060516234945@marcus-boerger.de> <1014418169.20060516181322@ionzoft.com> <1677590447.20060517002135@marcus-boerger.de> Date: Wed, 17 May 2006 09:23:42 +0200 Lines: 136 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-RFC2646: Format=Flowed; Original X-Posted-By: 195.225.34.5 Subject: Re: [PHP-DEV] private, protected, readonly, public From: r.korving@xit.nl ("Ron Korving") Marcus, I'm a big fan of this keyword. No "pppp", and this is in fact clearer and better than the readonly keyword I advocated. Great idea :) Ron "Marcus Boerger" schreef in bericht news:1677590447.20060517002135@marcus-boerger.de... > Hello Jason, > > i changed from readonly to readable, which means the new keyword makes it > public for any read access, that is: > > 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 alone > > best regards > marcus > > Wednesday, May 17, 2006, 12:13:22 AM, you wrote: > >> Hello Marcus, > >> Is this correct? > >> >> private readable $abc; >> - doesn't make sense. >> >> protected readable $abc; >> - sub-class can read, not write >> - not visible outside class > >> public readable $abc; >> - sub-class can read, and write >> - outside class can read, not write > > >> If not, please clarify. >> Thanks! > >> -- >> Best regards, >> Jason mailto:jason@ionzoft.com > >> Tuesday, May 16, 2006, 5:49:45 PM, you wrote: > > MB>> Hello Andi, > > MB>> nothing else needs to be fixed. The patch considers a reference as > a write > MB>> operation as well as anything else that doesn't identify itself as a > read > MB>> operation. And the enforcement itself just means that whatever you > define > MB>> besides readable is being ignored for read operations. > > MB>> best regards > MB>> marcus > > MB>> Tuesday, May 16, 2006, 11:41:31 PM, you wrote: > >>>> Where would readable be enforced? Would it try and prevent getting >>>> references to it? Are there any internal functions/classes which need >>>> fixing to honor readable? > >>>> I think these answers would really be helpful. > >>>> Thanks. > >>>> Andi > >>>> At 02:37 PM 5/16/2006, Marcus Boerger wrote: >>>>>Hello Andi, >>>>> >>>>> that is why most here already switched to "public readable". >>>>> >>>>>best regards >>>>>marcus >>>>> >>>>>Tuesday, May 16, 2006, 11:31:14 PM, you wrote: >>>>> >>>>> > I can't quite explain it but for me the ability to work-around >>>>> > private with methods which are able to access the private variable, >>>>> > is different than marking a property as read-only but it not being >>>>> > read-only in all semantics. Probably because private variables do >>>>> > often have getters and setters, whereas something which is marked as >>>>> > read-only (like a harddrive) tends to be read-only always. >>>>> >>>>> > Andi >>>>> >>>>> > At 02:08 PM 5/16/2006, Zeev Suraski wrote: >>>>> >>>However, the reason i write this mail is that you said there could >>>>> >>>be >>>>> >>>problems. Well this is deply integrated in the handlers and they >>>>> >>>don't >>>>> >>>let you out. In other words if this stuff is not working then the >>>>> >>>whole >>>>> >>>PHP 5+ object model is broken. Or in other words, if this is broken >>>>> >>>alot >>>>> >>>of other stuff regarding object handling is already broken. >>>>> >> >>>>> >>You're probably right about this one. You can already return a >>>>> >>reference to a private variable today and change it. Andi - did you >>>>> >>mean something else? >>>>> >>>>> >>>>> >>>>> >>>>>Best regards, >>>>> Marcus > > > > > MB>> Best regards, > MB>> Marcus > > > > > Best regards, > Marcus