Re: Function auto-loading
| From: | Lester Caine | Date: | Mon, 08 Aug 2016 20:54:28 +0000 |
| Subject: | Re: Function auto-loading | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-94953@lists.php.net to get a copy of this message | ||
On 07/08/16 12:19, Rasmus Schultz wrote:
> Being basically unable to ship or consume purely functional packages leaves
> the functional side of the language largely an unused historical artifact,
> which is sad. Keeping things functional and stateless often lead to more
> predictable and obvious code - I think the absence of good support for
> functions encourages a lot of over-engineering, e.g. developers
> automatically making everything a class, not as a design choice, for the
> sole reason of being able to ship and reuse what should be simple functions.
I can understand a little the overwhelming desire to wrap everything in
it's own set of name spaces, but is that REALLY essential to make PHP
'work better'. What is wrong with a simple 'include_once' of the library
you want to use globally across all the code? I have a set of legacy
libraries who's function is not going to change any time soon which
works just the same on old setup's as it does on PHP7. And I see no
reason to even bother with namespace's ... they simply make a lot of
mess for no apparent gain! Where I could see a gain is if those
libraries were simply additional extensions pre-loaded into the engine
rather than something which needs 'auto-loading' at all.
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk