Re: Re: [PEPr] Comment on RFC::ProtectedMembers

From: Date: Mon, 28 Jun 2004 01:19:55 +0000
Subject: Re: Re: [PEPr] Comment on RFC::ProtectedMembers
References: 1 2 3 4 5 6 7 8  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-31280@lists.php.net to get a copy of this message
Hi Alan, Alan Knowles wrote:
With a vote as close as it was: - I think a recommendation is probably more suitable than a requirement. I think that'd probably make everyone happy.
for b) - I guess it's up to the programmer to decide. - If you decide to make something protected, you are enforcing a usage requirement. In the authors view should it be allowable for an extended class to decrease the protection? - Yes: = use public syntax, No: = use private syntax. What I would suggest here is that if a developer (author) declares a property protected then it should be an assumption that the child class can make it public. Remember you can always make classes or methods 'final' if they're not to be extended. Relatedly, any change by an author to protected variables in [non-final] classes designed to be extended should be considered a BC break.
Hans

« previous php.pear.dev (#31280) next »