doc:scratchpad:namespacefaq
Differences
This shows you the differences between two versions of the page.
Last revisionBoth sides next revision | |||
doc:scratchpad:namespacefaq [2008/10/28 11:51] – created lsmith | doc:scratchpad:namespacefaq [2008/10/28 12:34] – Drafting in a few responses sfox | ||
---|---|---|---|
Line 9: | Line 9: | ||
Q: Would removing constants/ | Q: Would removing constants/ | ||
+ | |||
+ | A: Yes, but at a cost. Functions and constants within namespaced files would throw a fatal error. [Reference needed] | ||
Q: Was the "::" | Q: Was the "::" | ||
Q: Was the fact that the " | Q: Was the fact that the " | ||
+ | |||
+ | A: Yes, it was considered. However the fact that " | ||
Q: Why was character combination XYZ (":::", | Q: Why was character combination XYZ (":::", | ||
+ | |||
+ | A: There have been long and intensive public discussions over the choice of namespace separator in the past, and everyone at the internals meeting was familiar with the arguments against a wide range of potential characters. The possibilities were therefore very limited, as documented on the wiki page about this decision. [Link to Lukas' entry] | ||
Q: Why was " | Q: Why was " | ||
+ | |||
+ | A: It is already impossible to write Windows paths in PHP in the same way, ergo at least half the PHP community is already familiar with the idea that they need to either use single quotation marks or escape the backslash (" | ||
Q: Why do the PHP internals developer think that " | Q: Why do the PHP internals developer think that " | ||
Line 22: | Line 30: | ||
Q: Don't the PHP internals developer think that the fact that " | Q: Don't the PHP internals developer think that the fact that " | ||
- | Q: C++ uses "::" | + | A: No, because the usage context is completely different. |
+ | |||
+ | Q: C++ uses "::" | ||
+ | |||
+ | A: Ambiguity is an edge case, meaning that developers wouldn' | ||
Q: Why wasn't the proposal chosen to just require "use namespace" | Q: Why wasn't the proposal chosen to just require "use namespace" | ||
Q: Do I have to prefix all my internal function names with \ now? | Q: Do I have to prefix all my internal function names with \ now? |
doc/scratchpad/namespacefaq.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1