> One option that I haven't seem much discussion on is the opposite: Always
> only look in the global namespace. Any unimported unqualified usages will
> be treated as fully qualified names. This would match the proposed
> semantics for functions/consts and change the resolution rules for classes.
> I think this would have relatively little impact on how code is written, as
> classes already tend to make extensive use of cross-namespace references
> and the import is usually IDE managed.
>


Quick reaction: that'd make sense to me!

Adding a "use CurrentNamespace\Foo" or using "namespace\Foo" looks easy
enough to adopt.
Does this mean you're suggesting to use declare(symbol_lookup='global')? Or
shorter: declare(lookup='global'), or maybe even declare(global_lookup=1)
as I'm not sure we need 3 options here?

Reply via email to