Alternative to multiple namespaces per file
| From: | Stan Vassilev | FM | Date: | Sat, 31 May 2008 12:10:35 +0000 |
| Subject: | Alternative to multiple namespaces per file | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-38019@lists.php.net to get a copy of this message | ||
Hi,
I suppose this has been discussed before, so I'll not repeat reasons unless requested, but I
just want to offer a possible feature to mitigate the impact of "one namespace per file",
which doesn't have controversial syntax and hopefully less difficulties in the implementation:
class Fully::Qualified::Class::Name::Declaration { .... }
same as:
namespace Fully::Qualified::Class::Name;
class Declaration { .... }
... except of course this allows classes of different namespaces to be declared in one file. Most
namespace-enabled languages consider the above declarations equivalent. Share your opinions.
Regards,
Stan Vassilev