Ah. Yes, that makes perfect sense to me. The logical solution must be then, however, not to implement namespaces at all, or requiring code

It's not a solution, it's refusing to solve a problem.

for the behavior from an implementational standpoint, but I think it really is obvious that such a namespace solution would be completely useless, as it would not be possible under any circumstances to provide

If it's "obvious" for you that namespaces are useless, probably you need to give your obviousness-meter a check-up. They were found useful by many people, even if there are things to work out here and there - which happens with each new concept not tested in the field.

Or, as an alternative, introduce an optional third argument to spl_autoload_register where people can give a namespace name for which the autoloading should be performed. That would cut down overhead since

There's no such thing as "namespace name for which autoloding is performed". Autoloader receives a full class name, that's it. How this name was created is irrelevant.

just the autoload functions of currently imported namespaces would have to be called.

I don't understand what do you mean here, but it doesn't matter, since autoload call on each class access is very bad regardless of how it's implemented internally.

I don't really think, though, that doing something like use __php__; is a tall order, is it? It would only be necessary for those that consume

"use whatever;" is a no-op. There's even warning about it in the engine.
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

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

Reply via email to