Re: how to mark protected properties?

From: Date: Tue, 08 Jun 2004 07:25:41 +0000
Subject: Re: how to mark protected properties?
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-30132@lists.php.net to get a copy of this message
On Mon, 7 Jun 2004, Hans Lellelid wrote: > > 100% pure encapsulation is not efficient > > I would say encapsulation is at least half the point of using OO in the > first place, so I'd heartily agree with Bertrand. Everything should be > private/protected and hence prefixing every var with '_' seems to make > little sense. Must say I agree here. Efficient is more than just finely tuned fast running code. Efficient is also easily maintenable code. Accessing class properties directly degrades maintainability. Besides, I doubt providing accessor methods would sacrifice speed too much unless you code is already perfect in other areas. -- Mika Tuupola http://www.appelsiini.net/~tuupola/

« previous php.pear.dev (#30132) next »