Re: What's wrong the __autoload()?
| From: | Greg Donald | Date: | Wed, 12 Mar 2008 15:33:44 +0000 |
| Subject: | Re: What's wrong the __autoload()? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-271386@lists.php.net to get a copy of this message | ||
On 3/12/08, Richard Heyes <richardh@phpguru.org> wrote:
> > I'm wondering what's wrong with the use of __autoload(), since I see that
> > projects like the Zend Framework don't use it and prefer to require_once
> > each required file.
>
> Things that happen without you explicitly causing them (ie require() et
> al) can lead to confusion.
It's called "convention over configuration" and that's exactly where
good frameworks should be headed.
http://en.wikipedia.org/wiki/Convention_over_Configuration
> For example a junior developer who doesn't know of its existence and is
> new to a job is less likely to admit ignorance and ask how a class is
> being defined when __autoload() is being used.
That's a the dumbest reason I've ever heard to not use a given language feature.
--
Greg Donald
http://destiney.com/