On Mon, Feb 13, 2012 at 09:01:03AM +0100, Simon Schick wrote:

> Hi, Paul
> I personally pretty much like the idea of auto-loaders, but that's a
> personal point of view.
> If you have always develop with scripts having autoloaders you'll hate to
> write a *require_once* command at the beginning of all files. And what
> would a dependency-injection-container be without an autoloader ;)
> http://www.slideshare.net/fabpot/dependency-injection-with-php-53

I wrote a quite solid dependency-injector one time, and used it for a
while. But it introduced a certain opacity into my code that I didn't
like very much, and I ultimately abandoned it, even though it worked
quite well.

It's kinda like in C. If I want to use the strchr() function, I know I'd
better do an #include <string.h> to get that functionality. I can't just
assume all the library functions are all just there, waiting for me to
use them. While I've often complained about having to include those
header files to get to those functions, I still prefer having those
"include" calls obviously staring at me at the top of my files. I don't
have to *assume* it's there somewhere. I can see it right there, and it
comforts me.

Maybe all this is my "C" upbringing....


Paul M. Foster

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to