On Thu, 28 Nov 2019 at 11:01, Claude Pache <claude.pa...@gmail.com> wrote: > I think it is better to keep the language as regular as possible, and consider that every non-fully-qualified name is relative to the current namespace, unless there is an explicit `use` declaration that says otherwise
That's already false, and will only be true if we deprecate and remove the fallback to global scope. > use function *; // don't know what this does, but apparently it's good for > > performance ¯\_(ツ)_/¯ > > Or: “don't know what this does, but apparently it silences deprecation > notices...” > Silencing deprecation notices is always a temporary side-effect of fixing code to work *at all* in some future release. Or rather, it should be - I am 100% against any notion of "indefinitely deprecated and may never be removed", that should always be some other type of notice. If we were deprecating unqualified functions from being looked up in the current namespace, we would not need to add this new directive, we could raise deprecation notices whenever the current lookup logic succeeded in finding a namespaced function. Silencing the deprecation notice would require either fully qualifying the function name, or explicitly adding a "use" statement. The issue indeed is that the meaning is far from self-evident. Maybe one > could use something that everyone and their mother could understand at > first reading, such as: > > use function from global namespace; > That still doesn't really explain what's happening, because in code that doesn't use any namespaced functions, the line has no user-visible effect at all - functions are *always* used from the global namespace. What it actually does is switch *off* a language feature, so perhaps it should be something more like: declare(lookup_functions_in_current_namespace=false); That would also mean that it can be covered by any future way of setting language directives, such as settings per "module", bundling into "editions", etc. Regards, -- Rowan Tommins [IMSoP]