Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15775 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30915 invoked by uid 1010); 4 Apr 2005 00:47:11 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 30896 invoked from network); 4 Apr 2005 00:47:11 -0000 Received: from unknown (HELO trachtenberg.com) (127.0.0.1) by localhost with SMTP; 4 Apr 2005 00:47:11 -0000 X-Host-Fingerprint: 209.58.150.153 miranda.org Linux 2.4/2.6 Received: from ([209.58.150.153:58379] helo=miranda.org) by pb1.pair.com (ecelerity HEAD r(5268)) with SMTP id D3/1C-19272-E8E80524 for ; Sun, 03 Apr 2005 20:47:10 -0400 Received: (qmail 22393 invoked by uid 546); 4 Apr 2005 00:47:07 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 4 Apr 2005 00:47:07 -0000 Date: Sun, 3 Apr 2005 20:47:07 -0400 (EDT) X-X-Sender: adam@miranda.org To: Andi Gutmans cc: Marcus Boerger , Zeev Suraski , internals@lists.php.net In-Reply-To: <5.1.0.14.2.20050403085747.02857a90@localhost> Message-ID: References: <5.1.0.14.2.20050403125628.03f83de0@localhost> <5.1.0.14.2.20050403125628.03f83de0@localhost> <5.1.0.14.2.20050403085747.02857a90@localhost> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] __autoload() enhancement From: adam@trachtenberg.com (Adam Maccabee Trachtenberg) On Sun, 3 Apr 2005, Andi Gutmans wrote: > I don't think the right solution though is to leave the not-optimal > solution in the engine, and create a solution outside the engine. I think > we should find a way to tune the engine so that it works well. Zeev's > suggestion keeps BC. If there are concerns as far as chaining order are > concerned, I personally don't have a problem supplying an API function > where functions can be added programmatically. > We'd then get the best of both worlds and make it very accessible by everyone. FWIW, I don't think maintaining BC is super important here. I don't believe lots of people are using __autoload() currently, and it should be pretty trivial to migrate to whatever solution we end up with. I would prefer we concentrate on getting the __autoload() behavior that we think is right. If we can do both, then that's a win-win, but we shouldn't let BC get in the way here for the two reasons I outlined above. Also, from a timing perspective, if we are modifying __autoload(), I would suggest that PHP 5.1 would be the correct place to introduce it. Finally, on the point of "does order matter?" I think order does matter. I may want to pull classes from a general framework (such as PEAR) and also from my own personal set of classes. I don't want to accidently include a PEAR class that has the same name as my own class. I believe Andrey's reference to include_path (or the PATH variable in your shell) is a good one. What if we said developers can't rely on the order of their path? The feature would be far less useful because of clashes. -adam -- adam@trachtenberg.com | http://www.trachtenberg.com author of o'reilly's "upgrading to php 5" and "php cookbook" avoid the holiday rush, buy your copies today!