""Nathan Nobbe"" <quickshiftin@xxxxxxxxx> wrote in message news:7dd2dc0b0710031007t150f9387n544c8a3a58666d04@xxxxxxxxxxxxxxxxx > On 10/3/07, Tony Marston <tony@xxxxxxxxxxxxxxxxxxxxxxxx> wrote: >> >> Encapsulation is NOT data hiding. Take a look at > > > please stop putting words into my mouth. i never once said encapsulation > is > data hiding. > I stated PublicPrivateProctected facilitates encapsulation. The dictionary definition of "facilitate" is to make easier or better. Data and methods are either contained within the same capsule or they are not. There are no intermediate levels of encapsulation. Data hiding has absolutely no effect on encapsulation. Hiding data does not make encapsulation better, and not hiding data does not make encapsulation worse. Encapsulation and data hidng are NOT connected in any way. You can have encapsulation without data hiding, and you can have data hiding without encapsulation. > tonight when i get home ill post > a snippet from an entry level oop book (such that i recommend earlier) > that > says almost > verbatim what i have. > > practically any non-trivial class will have member variables that it uses > in > order to facilitate > its member functions. So what? Those variables do not have to be private or protected in order to function. > many of those variables have nothing to do w/ the > functionality the > class exposes to client code. if those variables are modified directly, > because they cant be > protected by ppp, then the functionality of the class can be distorted. > that is why ppp exists. PPP exists to place restrictions on stupid programmers. It does not add an functionality, or make the code run faster. > if a class has variables client code doesnt need to know about to do its > job, then client code > by no means should have access to it. > interfaces are a powerful mechanism. its a shame youre turning your back > on > them. Using interfaces does not give me access to any functionality that I do not have by accessing methods directly, so why waste time in using them? -- Tony Marston http://www.tonymarston.net http://www.radicore.org > -nathan > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php