On Mon, Jul 18, 2016 at 9:55 AM, Nikita Popov <nikita....@gmail.com> wrote:

>
> A relaxed variant would only invoke the autoloader once for each
> call, assuming that a function that is not loadable at one time will never
> become loadable (which is of course a significant restriction). The former
> variant would be prohibitively slow. The latter is more realistic, but I
> expect it to have non-trivial performance impact nonetheless.
>
>
Is that really a significant restriction? The only difference it would make
is for code that expects "namespace Bar { foo(); }" to refer to global
function "foo()" at one point in the program, and later to refer to
"Bar\foo()" at another point in the program, after "Bar\foo" has become
loadable. That kind of temporal coupling with the symbols that happen to be
loaded/loadable at a given point in time sounds just awful, and I can't
imagine what the use case would be.

Considering Option B can cause the introduction of global functions to
break code (my previous email), the caching of negative results from the
autoloader sounds like the only feasible option.

Reply via email to