Re: Namespaces: Technical proposal

From: Date: Tue, 29 Nov 2005 08:04:34 +0000
Subject: Re: Namespaces: Technical proposal
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-20803@lists.php.net to get a copy of this message
Oliver Grätz wrote:
Here's the idea: When the tokenizer encounters the opening "?" of the ternary, it DEACTIVATES the namespace operator until the end of the ternary. This way, all old code will behave as before, nothing will be broken. Of course, this absolutely requires the use of parentheses if one 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!
this adds almost the same WTF? factor as requring whitespace, and being a pretty rare case only adds to this ... (not to mention that maintaining a parser with special state rules like this becomes a WTF? PITA anyway ...) -- Hartmut Holzgraefe, Senior Support Engineer . MySQL AB, www.mysql.com

« previous php.internals (#20803) next »