Re: Re: [PEPr] -1 for Tools and Utilities::CodeGen_MySQL_UDF
| From: | xo boots | Date: | Fri, 02 Sep 2005 11:40:47 +0000 |
| Subject: | Re: Re: [PEPr] -1 for Tools and Utilities::CodeGen_MySQL_UDF | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-39689@lists.php.net to get a copy of this message | ||
Hi.
Although I have no karma here, I would like to raise a small point.
Initially, my reaction to PHP5's PPP abilities made me think that underscore
prefixing could be abandoned, at least for protected members. After much use
of PHP5's dynamic __get/__set to automate property getters and setters, I
wonder if that is entirely a good idea.
In short, with __get/__set a virtual property can be exposed as public but
be based on a private *or* protected underlying member. Therefore, the name
of the underlying member can not be same as the name of the exposed virtual
property since in that case, __get/__set would no longer be visible. That's
not a problem for private members since they are still prefixed, but it is a
problem for protected members if they are not prefixed.
I'm not sure it sould be mandatory as it seems to only trip on this sort of
case. In the long run, it may be more prudent to invent a new prefix for
members that are used to implement virtual properties (eg: _v_).
Best regards and apologies if I am intruding,
boots
On 9/2/05, Lukas Smith <lsmith@php.net> wrote:
>
> Hartmut Holzgraefe wrote:
>
> >> 2) Private members are not prefixed with _
> >
> >
> > does this rule still apply to 5.0 code?
> > (all members are now declared "protected" instead of "var")
>
> http://pear.php.net/pepr/pepr-proposal-show.php?id=99
>
> maybe this should be added to the CS?
>
> regards,
> Lukas
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>