Alan Knowles wrote:
I dont know if you read the blog comments here:
http://www.akbkhome.com/blog.php/View/79/require_once+is+part+of+your
+documentation..html
and here
http://www.akbkhome.com/blog.php/View/77/is+__autoload+evil%3F.html

and slightly related
http://www.akbkhome.com/blog.php/View/76/require_once%2C+one
+optimization+too+many%3F.html

It's pretty clear that people want to use autoload to save them having
to deal with include paths.. (and perhaps save a few stat calls) - the
more straightforward solution would be to add a include/require callback
handler - so that rather than a class instantation action, magically
doing file operations, you had a simpler and more obvious way to manage
inclusions.

But I guess Until I bother hacking something up for it, it'll remain
little more than another heckle from the audience. ;)

Frameworks should provide __autoload() helper methods, but should never implement the function itself. Its upto the enduser to do this. This is the only way it makes sense. Otherwise most of Alan's horror scenarios actually come true. The cleanest way indeed is to be able to set the function name for autoloading as a callback. We we have this now via spl. So I dont see a point messing with it and thereby making this tool unmaintainable and totaly inconsistent with the reset of the language. I can already see it .. in 5 years there will be books on php __autoload().


regards,
Lukas

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to