Hi!

Following the feedback from the community, we (mostly me and Dmitry) tried to find a good model that would allow multiple namespaces per file without running into too many problems and complications, and would allow to bundle multiple namespaced files together without modifications. It looks like it is possible to do, but only under the following condition: the file can have multiple namespaces, but if the file has namespaces, then it can have no code outside namespaces.

For example, this would work:
namespace A;
class X {}
namespace B;
class Y {}

This would not work:
class X {}
namespace A;
class Y {}

This would not work either:
require 'foo/bar.php';
namespace A;
class X {}

This however would work:
namespace A;
require 'foo/bar.php';
class X {}
namespace B;
class Y {}

So, for the people that wanted multiple NS per file, would such solution work?

P.S. this is *not* a "should we use braces" thread, so please don't :)
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to