title: Are namespaces really all that useful in frameworks?
body: <p>As far as I can tell, the only reason we have namespacing in PHP is to fix the problem of classes (+ functions &amp; constants) clashing with others classes of the same name.</p>
  
  <p>The problem is that most frameworks setup their <strong>autoload</strong> and <strong>filesystem hierarchy</strong> to reflect the names of the classes. And no-one actually require()s or include()s files anymore.</p>
  
  <p><strong>So how does namespacing help this any?</strong> Either the class is loaded based off of it's name:</p>
  
  <pre><code>new Zend_Db_Table_Rowset_Abstract;
  </code></pre>
  
  <p>or off it's namespace</p>
  
  <pre><code>new Zend\Db\Table\Rowset\Abstract;
  </code></pre>
  
  <p>Either way I am stuck with only being able to create one class with this name.</p>
  
  <pre><code>/var/www/public/Zend/Db/Table/Rowset/Abstract.php
  </code></pre>
  
  <p><strong>UPDATE</strong>
  I'm not sure I'm getting the point across.</p>
  
  <p>Even if I created two files with the same <code>class Zend\Db\Table\Rowset\Abstract</code> in them I still couldn't use them together since they both claim the same namespace. I would have to change their namespace names which is what we already do!</p>
  
  <p>This leaves me to belive that the only use for namespaces is function names. Now we can finally have three functions all named the same thing! </p>
  
  <p><strong>Or wait, I forgot <em>you can't do that either</em> since each requires the namespace prefix!</strong></p>
  
  <pre><code>a\myfunction();
  b\myfunction();
  c\myfunction();
  </code></pre>
  
  <p>Taking ircmaxell's example:</p>
  
  <pre><code>$model = new \Application\Model\User;
  $controller = new \Application\Controller\User;
  </code></pre>
  
  <p>How is that any different than without?</p>
  
  <pre><code>$model = new Application_Model_User;
  $controller = new Application_Controller_User;
  </code></pre>
  
  <p>This is also a neat sounding feature - but what does it truly do for us?</p>
  
  <pre><code>use \Application\Model\User as UserModel;
  use \Application\Controller\User as UserController;
  
  $foo = new UserModel;
  $bar = new UserController;
  </code></pre>
  
  <p>Now you cannot have a class named 'UserModel' since you have a namespace setting for that term. You also <em>still</em> cannot have two classes named under the same alias.</p>
  
  <p>I guess the good thing is that you can rename the long <code>Zend_Db_Table_Rowset_Abstract</code></p>
  
  <pre><code>use Zend_Db_Table_Rowset_Abstract as RowAbstract;
  </code></pre>
  
  <p>leading to developer confusion about where the non-existent class "RowAbstract" is defined and coming from in the system.</p>