Re: Namespaces: Technical proposal
| From: | Bart de Boer | Date: | Tue, 29 Nov 2005 10:51:51 +0000 |
| Subject: | Re: Namespaces: Technical proposal | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-20811@lists.php.net to get a copy of this message | ||
Just wondering. There's another thread about goto and labels running as well. If they vote for something like:
LABEL:while (cond) {
}
Wouldn't this add another technical diffuculty with using ':' as a namespace seporator?
Oliver Grätz wrote:
Lukas Smith schrieb:Oliver Grätz wrote:Nope. Parentheses are a totally different thing here. Adding mandatory whitespace means giving syntactic meaning to something that normally never should have it. Meaningful whitespace is really evil. On the other side parentheses are already there. They are an existing concept of scoping evaluation. The idea simply consists of not having namespaces inside the ternary: - Read the "?": turn off T_WHITESPACE - "(" and ")": reactivate between theseone absolutely needs to use namespaces inside the ternary. As such cases will be pretty rare, this is no big drawback. The good thing: no whitespace magic is needed!so you replace the need for whitespace magic with the need for parentheses? you do notice you are running in circles?(a marker 'whitespace was off before "("' is needed)- ":": do nothing - end of ternary (")" or ";" or something I might have forgotten): reactivate T_WHITESPACE Thisd is also very easy to remember since the rule to learn is: Namespaces don't exist where they can't. And with the ":", there is only one such place. OLLi