Re: Re: [VOTE] declare(function_and_const_lookup='global')

From: Date: Wed, 29 Jan 2020 04:48:25 +0000
Subject: Re: Re: [VOTE] declare(function_and_const_lookup='global')
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-108308@lists.php.net to get a copy of this message
On Tue, Jan 28, 2020, at 10:03 PM, Theodore Brown wrote: > The RFC mentions two problems it hopes to solve: a minor performance > decrease, and developers having to deal with ambiguity. However, a > third problem that I think is just as important to fix is the lack of > function autoloading which makes extensive use of namespaced functions > unfeasible. Without weighing in on the RFC itself, I really don't think this statement is true anymore. Back in the day, sure; autoloading for class-like-things only made functions second class citizens. However, Composer use is now near-universal for new code. Composer can load specific files full of functions during autoload just fine, and then the functions are universally available. That would have been a performance hit, but with opcode caching the hit is minimal. With preloading in 7.4, even that is reduced to almost zero. Between those two, having a library that is mostly a pile of namespaced functions that are just always-available is quite reasonable and feasible these days. Whether it's architecturally good or bad is another question, but I don't think the lack of autoloading is a good excuse anymore. --Larry Garfield

« previous php.internals (#108308) next »