Re: Re: Namespace Resolution

From: Date: Wed, 05 Nov 2008 22:46:40 +0000
Subject: Re: Re: Namespace Resolution
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-41700@lists.php.net to get a copy of this message
Here are some reasons why we felt that functions/constants should fallback: - most namespace users will be using classes and not functions
This is a self-fulfilling prophecy, the more you open a gap between classes and functions, the more people will stick with the richer functionality since it's just too much hassle to bother with two different paradigms. Case in point: do you know a major reason why people keep using static methods to "fake" functions? It's not as much to namespace it. I mean Foo::bar() or Foo_bar(), who cares? It's all the same. But the big difference is, I don't have to explicitly load the function library if it's a static class. Classes have autoload, functions mysteriously don't. Hence, even I have abandoned using functions today and use fugly static method hacks. It's less hassle to do it wrong right now, than do it right. So I do it wrong. Namespaces won't change any of this, since I still can't autoload my function library. Regards, Stan Vassilev

« previous php.internals (#41700) next »