Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 2000051

Re: [PHP3] Encapsulation From: Alfred Perlstein (bright <email protected>)
Date: 05/09/00

* Richard Lynch <richard <email protected>> [000509 13:57] wrote:
> In article <20000507072529.21169.qmail <email protected>>,
> rajani_21 <email protected> (Rajani Iyer) wrote:
>
> > Why is it that php doesn't support encapsulation. Why
> > can't the variables in a class not be declared
> > private, so that they can't be accessed directly from
> > outside.
> >
> > If it doesn't support this concept, then why use
> > objects at all.
>
> [tongue firmly planted in cheek]
>
> Since 90% of OO-coders overuse/abuse data hiding (private/public) in the
> first place, the PHP Developers know it complicates one's understanding of
> a language.
>
> Thus they were very wise not to include it in a language whose primary
> goals include ease of understanding by non-programmers.
>
> Note that if you really want private variables, you are free to add them
> to the PHP source code in C, or design your own class system based on
> PHP's classes in PHP code.

Is this an invitation for private methods to be implemented and
brought into the php engine, or are you saying that we're free to
implement it, but it will not be brought into the engine (as released
from php.net).

-- 
-Alfred Perlstein - [bright <email protected>|alfred <email protected>]
"I have the heart of a child; I keep it in a jar on my desk."

-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>