RE: [PHP] What's the use in OOP?
| From: | Chris Shiflett | Date: | Mon, 29 Mar 2004 23:23:02 +0000 |
| Subject: | RE: [PHP] What's the use in OOP? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181743@lists.php.net to get a copy of this message | ||
--- Kelly Hallman <khallman@ultrafancy.com> 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.
> However, most people that rely on this assertion do not usually
> understand leveraging OO and also most do not write excellent non-OO
> code. :)
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.
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.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security - O'Reilly
Coming Fall 2004
HTTP Developer's Handbook - Sams
http://httphandbook.org/
PHP Community Site
http://phpcommunity.org/