Re: Namespaces bug
| From: | Shane Caraveo | Date: | Wed, 26 Mar 2003 19:46:09 +0000 |
| Subject: | Re: Namespaces bug | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-351@lists.php.net to get a copy of this message | ||
Rasmus Lerdorf wrote:
On Wed, 26 Mar 2003, Shane Caraveo wrote:Didn't figure you were, I'm simply arguing that it shouldn't be allowed for either. It doesn't serve any usefull purpose and has negative impact, and since this is a major version change, so we should feel free to break a bit of BC in places like this. ShaneRasmus Lerdorf wrote:I'm not arguing that it is correct, I am simply saying that it is exactly the same issue and it doesn't make a whole lot of sense to me to disallow it for namespaces, but allow it for functions.Couldn't you make the same argument for: function A() { function B() { } }I would :) The syntax is meaningless and confusing if the program does not operate the way it is written. By all sensible considerations, B should be local to A. Since it is not, the syntax should cause a parser error, and the same with namespaces. And then what happens with that stuff when, at some point in the future, proper scoping is implemented?