Re: Some PEAR remarks
| From: | Vincent Oostindie | Date: | Fri, 19 Apr 2002 10:48:57 +0000 |
| Subject: | Re: Some PEAR remarks | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-1208@lists.php.net to get a copy of this message | ||
On Wed, 17 Apr 2002 18:11:48 +0200, Martin Jansen wrote:
> Since there are no real private variables in PHP (they will be included
> in Zend Engine 2), we use an underscore in front of the variable name to
> tell people that are using PEAR code that the variable is a private one
> and shouldn't be accessed from outside of the PEAR classes.
>
> So there is nothing magical around the underscores, it's just to make
> the life of programmers more comfortable.
I understand all this. I'm not THAT thickheaded :-)
I'll try one more time, and then we'll drop the subject, allright? We
never will agree anway, I think...
My point of view is the following: member variables are always private
(whether they are in the language are not). As a result, I never get the
idea to access them directly. And as a result of that, there's no need to
mark 'private' member variables different than 'public' member variables.
From my point of view, there's no difference between the two. Or better
yet: the latter don't even exist!
Vincent