Re: Getting rid of "underscore for private method names" coding standard
| From: | till | Date: | Fri, 15 Jan 2010 10:42:55 +0000 |
| Subject: | Re: Getting rid of "underscore for private method names" coding standard | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-53211@lists.php.net to get a copy of this message | ||
On Fri, Jan 15, 2010 at 8:42 AM, Christian Weiske <cweiske@cweiske.de> wrote:
> Hello all,
>
>
> I refer to http://pear.php.net/manual/en/standards.naming.php
>
> Time has come to get rid of the "Private class members are preceded by
> a single underscore" rule. There are several reasons for that:
>
> 1. PHP5 has visibility modificator support (public, private, protected)
> 2. Having an underscore preceding private methods and class variables
> makes it impossible to open up the API without breaking existing
> code. Just imagine that a currently private method shall become
> protected or public because time has shown that it can and should be
> used outside.
> Technically it is no BC (backwards compatibility) break, because
> private methods and class variables could only be used from within
> the class itself, but still it may mean that a lot of code has to be
> changed.
>
>
> Ideas on this issue?
Great ideas!
+1
Till