Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68798 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9879 invoked from network); 31 Aug 2013 23:05:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Aug 2013 23:05:16 -0000 Authentication-Results: pb1.pair.com header.from=florinpatan@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=florinpatan@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.174 as permitted sender) X-PHP-List-Original-Sender: florinpatan@gmail.com X-Host-Fingerprint: 209.85.214.174 mail-ob0-f174.google.com Received: from [209.85.214.174] ([209.85.214.174:35192] helo=mail-ob0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EE/59-55332-BA672225 for ; Sat, 31 Aug 2013 19:05:16 -0400 Received: by mail-ob0-f174.google.com with SMTP id wd6so3222558obb.5 for ; Sat, 31 Aug 2013 16:05:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=6XupSFbDm3m8thpKGTRupS37/D7K5/eoK0ICsPxuPdw=; b=ZBEeyj2X6dRMr4X3Dhu6wXc15cQri5oXlwjf1mUKKGlJ41OykQOjguvz2RbBPyTwSk iKJGXHss1qatvXeGHjS1kNB/P+1G0hzmSgB35yR3qLiUVKKIAkw03RqEgCDfkzw/2imK MwTeSo4gXQdd9MOnpSyP3OsdWCn2To+9Y4H4Uxs+xJ4aafovk22azbZnSfNOwXmIbern LPMfQHnTqss8k4O9aO16KSQxMGbx0XimQQXJp3KmMJ7On+mW31x6OH58Zre1mRAgLdSz Hcpa/K3Wqy5KSk8+z37/UxyVDvG9BNZ5QuvmHZa3QDDEsyo0soDUQSgQmqncQ7a7HQmV QzKA== X-Received: by 10.182.110.202 with SMTP id ic10mr11825981obb.73.1377990312114; Sat, 31 Aug 2013 16:05:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.85.133 with HTTP; Sat, 31 Aug 2013 16:04:42 -0700 (PDT) In-Reply-To: References: <5220262A.6040702@sugarcrm.com> <5220437A.7050008@sugarcrm.com> <5220D212.3010101@sugarcrm.com> <61FCD6C4A31248078FEAD2BA73D7CD44@gmail.com> <7AF31CC1D1554454AC95AE758D23E92E@gmail.com> Date: Sun, 1 Sep 2013 01:04:42 +0200 Message-ID: To: Vartolomei Nicolae Cc: Ferenc Kovacs , Sebastian Krebs , Nikita Popov , Stas Malyshev , Sara Golemon , Anthony Ferrara , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Re: Function autoloading From: florinpatan@gmail.com (Florin Patan) On Sun, Sep 1, 2013 at 12:36 AM, Vartolomei Nicolae wrote: >> personally Ithink it would be nice if we could provide a way for const/function autoloading. > So you will create files for constants? One file with a single line defining a constant? > > Did I understood something wrong? > > kindly, > nvartolomei > Hi, Yes, you understood it wrong. You can have one function / const in a file if you want, but you can also have a bunch of them in a file like you have today with classes. And from what I read in the RFC, someone else who read it could confirm if I'm right or wrong, there's no mandatory function / file to use this so you can use it like the current autoloader for classes is working. This will be optional to use, like the current autoloader, which is why we don't have PSR-0 in Core (maybe we should have a thread about this sooner or later) and I've had plenty of use cases for a feature like this. Who knows, maybe we'll have PSR-Y Autoload Reloaded which will cover this as well :) Like it has been pointed out already, it also allows the language to be complete in what's offering and help some users along the way. Do you, or anyone else, have a real reason to be against this rather that: - I don't like it - I don't/won't use it - why do we need it? - it doesn't belong to the language - etc. So, my opinion as a PHP user is that it's a nice addition to the language and even if I won't use it, as long as it won't affect the global performance, I can live with it. Regards, Florin ---- Florin Patan https://github.com/dlsniper http://www.linkedin.com/in/florinpatan