Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68819 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75214 invoked from network); 1 Sep 2013 16:23:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Sep 2013 16:23:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=admacedo@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=admacedo@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.175 as permitted sender) X-PHP-List-Original-Sender: admacedo@gmail.com X-Host-Fingerprint: 209.85.212.175 mail-wi0-f175.google.com Received: from [209.85.212.175] ([209.85.212.175:39925] helo=mail-wi0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 87/94-55332-1F963225 for ; Sun, 01 Sep 2013 12:23:14 -0400 Received: by mail-wi0-f175.google.com with SMTP id ez12so456356wid.2 for ; Sun, 01 Sep 2013 09:23:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=M2W3zwvU5k5A2HlKZyz+Wkry5IkgFXSqcP7kk9H+tC4=; b=rRqLfGG8lmlyorNidzoOPFw5O+Fu2Kuxa/r7jk9ZCkIm//XSCj4Vvj9ZZTmyp7JaOk KikWJstiVfKCxxEt2CE6TbxOeZQuu0aZeWzLx1P9K2PBKQBqiNCIg4rwb+pqZcu41n4R Px8jUcVYAUCocEADuiGBZGOnt6dYLK3nWJEUo9mrdYct/YdSnW9chTqxSA3KYtV3FSv8 CGAfqbEKla+zgrDngsVKz+GpzODf1pubeM0NNDrRB9m9jn+Iu9fP60jr9yLMbsUjuWG+ Hr5hQeo0Pd142ylFV9St2LMfG2XgoYe6criKusN11WXQPAMpPqkr0R5ON+DZ/oDxZUEJ X8Kg== MIME-Version: 1.0 X-Received: by 10.180.188.49 with SMTP id fx17mr10223558wic.49.1378052590755; Sun, 01 Sep 2013 09:23:10 -0700 (PDT) Received: by 10.216.181.202 with HTTP; Sun, 1 Sep 2013 09:23:10 -0700 (PDT) Received: by 10.216.181.202 with HTTP; Sun, 1 Sep 2013 09:23:10 -0700 (PDT) In-Reply-To: References: <5220262A.6040702@sugarcrm.com> <5220437A.7050008@sugarcrm.com> <5220D212.3010101@sugarcrm.com> Date: Sun, 1 Sep 2013 17:23:10 +0100 Message-ID: To: Zeev Suraski Cc: Stas Malyshev , PHP Internals , Sebastian Krebs , Anthony Ferrara , Sara Golemon Content-Type: multipart/alternative; boundary=001a11c25bda2768fe04e554dfc8 Subject: RE: [PHP-DEV] [DRAFT] [RFC] Function autoloading From: admacedo@gmail.com (Daniel Macedo) --001a11c25bda2768fe04e554dfc8 Content-Type: text/plain; charset=ISO-8859-1 I can accept not supporting PSR directly but implementing the class autoloader and stating "internals believes autoload in should exist, just doesn't specify/support any particular implementation", this makes sense, although I like PSR and don't really see others that make (as much) sense. This means internally we recognise an issue, resolve it in a general manner and allow some decisions up to the developer. Most of us developing now have the dreaded Utils class, it's an ugly hack filled with static methods... Yes, it might be almost the same as a namespaced bunch of classes, if you don't share states between those methods. Now consider this: PSR or any autoloader implementation allows for better sharing and code reuse; AND it makes sense to allow this for OOP as well as procedural code! I think Anthony and Nikki can see the forest from the trees, and that the core should support a number of use cases, not just what you currently use (and developers miss this functionality Anthony proposes) Having namespaced functions now allows for a function autoloader that uses the namespace as the file: awesome, great, let's do this! If not by looking at others code, or at Python, or at the Class/Constants/Namespaced-Functions all needing to have and being positively impacted by an autoloader... at least try and foresee the sense it makes for non-oop-but-maintained-by-smart-people to have an autoloader! Try to understand that this need exists and, it makes sense as a step into organising and refactoring legacy applications and for structure/grouping of classes, functions and constants, if only for the sake of organisation, but also for code-sharing, code reuse AND less managing of 20 *_once calls on top of every file in legacy applications! ;) Also as a bonus, a bunch of functions/constants filled files could got through a request never being read/included if never used, this alone should warrant pause! --001a11c25bda2768fe04e554dfc8--