On Wednesday, March 26, 2003, at 02:36 PM, Rasmus Lerdorf wrote:
On Wed, 26 Mar 2003, Shane Caraveo wrote:
Rasmus Lerdorf wrote: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?
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.
I think that the argument is that it would be best to disallow it both places, but doing so would break bc for functions. Two wrongs don't make a right, though. Just because there have been confusing syntax choices in the past doesn't mean they should be propagated into the future.
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php