Mar 29 at 3:23pm, Chris Shiflett wrote: > > I think there is a bit of what I consider an efficiency myth in > > regards to OOP in PHP. Most agree that the OO implementation in PHP > > is not robust. > > It's much better in PHP 5, although a lack of robustness is not how I > would personally describe PHP 4's shortcomings.
Considering that OO is mostly a convenience for the coder, I just meant robustness of the implementation in a general sense, nothing specific... > > However, most people that rely on this assertion do not usually > > understand leveraging OO and also most do not write excellent non-OO > > Perhaps, but I would say that most people who make this assertion > understand OO. The performance penalty is not a myth. Just as templating > incurs a performance penalty, so does OO. The reward can be worth it, of > course, in terms of organization and ease of use. I meant most people that rely on this assertion, to avoid learning OO. If you have other reasons for not using OO, then great.. but when the subject is "what's the use of OOP?" then I think we're talking about two different groups of people... > The same argument extends further, since I would rather write some things > in PHP or Perl than than C. I know C is faster, but I'm usually more > interested in making things easier on myself. Precisely! The efficiency myth was meant only in the sense that it's a myth to think simply avoiding (delving into) OOP because "I've heard that it's slow in PHP" automatically means you're being more efficient. It's not the prime language for OOP but I find that when it all balances out, for web apps in PHP, OO offers an attractive price/performance ratio... (can't wait for PHP5) -- Kelly Hallman // Ultrafancy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php