On Wed, Aug 21, 2024, 9:34 AM Christian Schneider <[email protected]>
wrote:
> Am 20.08.2024 um 17:14 schrieb Levi Morrison <[email protected]
> >:
> > Keep in mind that qualifying
> > every global function is annoying but probably can be somewhat
> > automated, and will bring better performance. So again, this improves
> > the existing code even without upgrading.
>
> Just to be sure: Would code *not* using namespaces also have to qualify
> global function calls? I admit that I somewhat skimmed the discussion so I
> might have missed that point.
>
> The point where I think we disagree is that it improves the code. It may
> improve performance of the code (even though I somewhat doubt this has a
> *significant* impact on most projects) but it IMHO hurts readability.
> Writing the additional \ is less of a problem but as code is read a lot
> more often than written I think the additional "line-noise" is something
> I'd like to avoid.
>
> Regards,
> - Chris
>
Hi Chris,
You don't have to write additional \,
you can add "use function" statements
if you prefer that style.
It's no different from referencing global
classes, they either need to be prefixed
with \ or need to have a corresponding "use" statement.
Kind regards,
Faizan