You have a point, however it is not always this simple. Some applications have classes/functions that are not necessarily gathered in order by their namespaces. It would be a nightmare to try to organize and then bundle these functions and classes together dynamically into different files by namespace.
So far I agree with most of the opinions regarding namespaces on here, but I do think it would be best to allow multiple namespaces per file. People say this will be confusing, but namespace declarations are pretty clear, as in clean code they should be on their own line: namespace usefulStuff ; class a {} function z() {} Yes it has slight potential for chaotic code, but there are hundreds of ways to create chaotic code, and this is nowhere near the top of the list. I believe that the benefits of bundling (huge performance increases in my case) outweigh the risks. This may not apply to small projects with 2 or 3 namespaces, we also have to consider larger ones. On Fri, 2007-12-07 at 04:20 +1000, [EMAIL PROTECTED] wrote: > Just a thought... You know the whole thing about bundling into one file > improving performance. People do this when they have upwards of 20 classes > being included per request. I bet that most of the time these classes are a > part of a framework / something that would be a part of common name space > anyway. > > The whole "One namespace per file" policy will not stop people from bundling > their classes. It will still allow them to bundle, but they will be > restricted to just one file per namespace. > > So given a situation where someone has a library of around 20 classes... > Where they would normally bundle down to one file... They bundle it down to > 3 files, one for each namespace... There is hardly going to be much of a > performance difference between 1 and 3 includes. > > I guess the point I am saying is that everyone is freaking out about the > possible performance loss - but in reality you can still bundle and get 90% > of the bundling gain. > > SCOTT MCNAUGHT > Software Developer > > Synergy 8 / +617 3397 5212 > [EMAIL PROTECTED] > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php