Re: Why are the PHP namespaces different compared to C++?
| From: | Andrew Faulds | Date: | Fri, 07 Sep 2012 17:30:43 +0000 |
| Subject: | Re: Why are the PHP namespaces different compared to C++? | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-62897@lists.php.net to get a copy of this message | ||
On 07/09/12 18:24, Mark wrote:
To me this namespace in php stuff just looks like and alias. So why isn't it named as that: "alias"? I do not want to question the ones that implemented namespaces in php, but i do think that the name itself is at the very least confusing. Namespaces, like in C++, mean you can reference classes etc from other modules without name conflicts, yet not have to type gl_ or zend_ or whatever in front of every single name when writing code within that module, and that's about it.Yes, the behaviour is different, but they are still namespaces. Them being different from C++'s shouldn't be a surprise, C++ is quite a different language. -- Andrew Faulds http://ajf.me/