Re: [RFC] Function autoloading through spl_autoload*
| From: | Stas Malyshev | Date: | Wed, 17 Aug 2011 23:37:11 +0000 |
| Subject: | Re: [RFC] Function autoloading through spl_autoload* | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-54664@lists.php.net to get a copy of this message | ||
Hi!
On 8/17/11 2:44 PM, Matthew Weier O'Phinney wrote:
There's nothing saying you can't have the exact same situation right now with classes and autoloading, too.Well, there is something - the "file per class" custom which is followed quite widely. And also classes don't have fallbacks, while the functions do.
While I understand your objections, I think that after the functionality exists, there can be discussions about best practices -- e.g., putting one function per file when autoloading, or documenting when allI'm not sure anybody would really do function-per-file - it's too tedious. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227