Comments
Because PHP support procedural programming technique so add a line namespace Zend::DB is very difficult to read and find out which scope namespace cover. E.x:
<?php
namespace Zend::DB
echo 'Hello there';
class DoSomething {
}
interface CanDoIt {
}
callAFunction();
foreach ($seats as $seat) {
}
?>
You can see many language constructs here that can be mixed and confused with namespace scope.
Why can we offer a new keyword that can be used with extends or implements in class declaration. Ex: class A extends B in namespaceC...
<?php
class A extends B in namespaceC {
}
?>
It's really a matter of taste.. I actually like the 'namespace' keyword.. 'package' would be even better I think..
In any case, i don't really care how it works, as long as it works.. You can never really please everybody..
If you structure your code well, and add proper docblocks everywhere there never really should be an issue.. Beginners will likely not use namespaces anyway, and if they are interacting with other people's libraries; they should be properly documented.







