[PEPr] Comment on RFC::ProtectedMembers

From: Date: Sat, 26 Jun 2004 21:07:28 +0000
Subject: [PEPr] Comment on RFC::ProtectedMembers
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-31231@lists.php.net to get a copy of this message
Klaus Guenther (http://pear.php.net/user/thesaur) has commented on the proposal for RFC::ProtectedMembers. Comment: The current standard states that any method or property prefixed with an underscore is for internal use. The proper understanding of such methods and properties is that they are protected, not private. The php4 "@access private" means that the marked methods/properties are private/protected. In other words, that they are non-public. (If the manual states it in any other terms, it is completely belied by usage.) It does not mean that they are private in the same sense as the term is used in php5 or other OO languages. If you want to see this demonstrated clearly, look at the HTML_Common base class. The prefixed properties and methods are used in extending classes. HTML_Common has no purpose in and of itself. However, I do see a definite merit in clearly marking a difference between private and protected items. This need is almost stronger than any need for marking protected items. So I'm wavering here between the positions :-) Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=99 -- Sent by PEPr, the automatic proposal system at http://pear.php.net

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