Re: [RFC] Function autoloading through spl_autoload*
| From: | Herman Radtke | Date: | Mon, 15 Aug 2011 07:09:15 +0000 |
| Subject: | Re: [RFC] Function autoloading through spl_autoload* | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-54613@lists.php.net to get a copy of this message | ||
>> I already made an suggestion [1], that bypass this.
>
> That suggestion means you can not autoload namespaced function that
> overrides global function. Major WTF. Also leads to two autoload calls (one
> most probably resulting in exhaustive include path search) when autoloading
> a non-namespaced function. Pretty bad idea IMO.
It seems to me that the goal is a Python-esque approach to functions.
A module (or namespace) has a number of functions, classes, etc. Once
that namespace is loaded, everything is then accessible. This is
similar to wrapping a number of functions within a class. The main
difference is that using the namespace would allow functions to be
called without a prefix.
--
Herman Radtke
hermanradtke@gmail.com | http://hermanradtke.com