Quoting Stanislav Malyshev <[EMAIL PROTECTED]>:

"import PHP" is a no-op now. However, I have another idea about it (besides the fix for the import thing that indeed looks like a bug to me) - what if we add some syntax to say "use this namespace" which would use autoload, so you'd say:

namespace Test;
throw new this::Exception();

and it would mean Test::Exception (including autoloading). Without concentrating on 'this' name (we may have another, better name for that) would it make things better?

I don't think this helps; it means that you need to use the local syntax every time you use a class, instead of importing it once, and it doesn't resolve the fact that if you use a non-fully-qualified classname (like Directory, for a different example), you need to say ::Directory or else if a previous file in your namespace has defined a Directory class, the class you end up using changes.

This unpredictability is I think the worst part of the current implementation.

-chuck

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to