doc:scratchpad:namespacefaq

This is an old revision of the document!


Namespace FAQ

I think its mostly important we give answers of the type: [Yes,No], short reason (details at <url>):

Q: Couldn't these issues be solved by making PHP case sensitive?

A: No, this is not a viable solution, since PHP identifiers for the most part are case insensitive, changing this would essentially risk breaking compatibility with all PHP scripts in existence.

Q: Would removing constants/functions from namespaces make it possible to stick with “::” for namespaces?

Q: Was the “::” separator was dropped because of limitations on the Zend Engine?

Q: Was the fact that the “\” character is harder to type on various international keyboards considered and if so why was this character still chosen?

Q: Why was character combination XYZ (“:::”, “@” etc.) not chosen?

Q: Why was “\” chosen given that it makes it impossible to write something like “spl_autoload_register(array(“myNamespace\theLoader”, “load”));” because the \t would be interpreted as a tab?

Q: Why do the PHP internals developer think that “\” is not prone to cause issues when typos are made?

Q: Don't the PHP internals developer think that the fact that “\” is widely used as the escape character will be cause for confusion?

Q: C++ uses “::” for namespaces, why did the PHP internals developer feel they needed to solve the ambiguity issues rather than leaving it to each developer to prevent ambiguity between namespace names and other identifiers?

Q: Why wasn't the proposal chosen to just require “use namespace” and “use class” chosen?

Q: Do I have to prefix all my internal function names with \ now?

doc/scratchpad/namespacefaq.1225194712.txt.gz · Last modified: 2017/09/22 13:28 (external edit)