So you say you will create a file for every function you want to support autoloading? As I already asked, tell us about realworld use case, for example where this could improve say big projects like Symfony or ZF. There is no logic to add this functionality just because we can.
kindly, nvartolomei On Friday, August 30, 2013 at 8:38 PM, Nikita Popov wrote: > On Fri, Aug 30, 2013 at 7:10 PM, Stas Malyshev <smalys...@sugarcrm.com > (mailto:smalys...@sugarcrm.com)>wrote: > > > Hi! > > > > > Well, static methods aren't the same as functions. > > > > The big difference being? > > This seems to be the core of your argumentation in this thread: "Why don't > you just use Foo::bar() instead of foo\bar()?" > > In which case, I wonder why we have functions at all. We could just use > static methods instead after all. Maybe we should deprecate function > support? > > On a more serious note: If you want an actual example of how functions can > be easier to use than static methods, consider the "use function" RFC. Now > that it's in, it is possible to directly import a function foo\bar() and > use it with just bar(). Static methods allow no such thing. You always need > to write the class name. > > The reason why people currently resort to using static methods instead of > functions is the fact that there is no autoloading for functions. With > autoloading, functions become a lot easier to use. > > Nikita -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php