Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94953 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30039 invoked from network); 8 Aug 2016 20:54:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Aug 2016 20:54:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.230 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.230 mail4-3.serversure.net Linux 2.6 Received: from [217.147.176.230] ([217.147.176.230:55988] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 82/C9-33134-781F8A75 for ; Mon, 08 Aug 2016 16:54:33 -0400 Received: (qmail 12956 invoked by uid 89); 8 Aug 2016 20:54:29 -0000 Received: by simscan 1.3.1 ppid: 12949, pid: 12952, t: 0.0698s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.7?) (lester@rainbowdigitalmedia.org.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 8 Aug 2016 20:54:28 -0000 To: internals@lists.php.net References: Message-ID: Date: Mon, 8 Aug 2016 21:54:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Function auto-loading From: lester@lsces.co.uk (Lester Caine) 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