Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68799 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11430 invoked from network); 31 Aug 2013 23:11:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Aug 2013 23:11:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.170 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.128.170 mail-ve0-f170.google.com Received: from [209.85.128.170] ([209.85.128.170:51048] helo=mail-ve0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 94/B9-55332-61872225 for ; Sat, 31 Aug 2013 19:11:19 -0400 Received: by mail-ve0-f170.google.com with SMTP id 15so2324724vea.29 for ; Sat, 31 Aug 2013 16:11:15 -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 :content-type; bh=HzSGFWVzB5RQbuVAo+O/7bnYTRMqHXHrQFBdo6lNJ88=; b=SbvETRrYdaoqCSmAZHpG8xbgm0z18C5nLgVQ8ihSjx4RWkrQLHH35thZhKbH3E9IVz v7ocydGx0y1ZJqsUBbs2eLwMTbVPsIZmyT8hrYyhIWItZEano3sDukMYE1O4cZhYoRAo YEgxEK1j+sjsFPlKVmOZ9rfkvYBxD3/kTq1AWyVY+zJIcmdxXIJEnQyQcvR4hl0xp6Ii i7fxA3HkUKRR5Gg4Tz9ZBBQ78mzjKQpB2Q48PfewZQzg0QXEZc9caodrOoByQ5oHqr7B vJWVyuDLA/GGqpaopwDEvIlrWm/HfFPiYZi3JdZWKhcKgaWp+kpXkcQCK4bZ75NN0VAd GMxQ== MIME-Version: 1.0 X-Received: by 10.58.73.202 with SMTP id n10mr15570905vev.7.1377990675302; Sat, 31 Aug 2013 16:11:15 -0700 (PDT) Received: by 10.58.94.201 with HTTP; Sat, 31 Aug 2013 16:11:15 -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: Sat, 31 Aug 2013 19:11:15 -0400 Message-ID: To: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7bacbb5cb48f1404e54674a5 Subject: Re: [PHP-DEV] Re: Function autoloading From: ircmaxell@gmail.com (Anthony Ferrara) --047d7bacbb5cb48f1404e54674a5 Content-Type: text/plain; charset=ISO-8859-1 All, There has been a lot of discussion unto the merit of this feature. That's fine. What I'd really like to know before proposing this is what can be improved in this RFC. For example: someone (Stas) brought up that it was weird that all three types (Class, Function, Constant) are served by a single register function (and multiple can be served by a single autoloader). Personally, I see this as a significant simplification advantage, but I can see if others don't. If you don't, can we please try to ideate around coming up with a better syntax? Another example: I've received a lot of feedback that using the "php" root namespace is weird and unexpected. Does anyone agree? Should that be changed prior to proposing this feature? Let's try to improve this RFC to be the best it can prior to proposing and voting. Even if you don't think it's necessary, there are surely things you think can be improved (and hence everyone wins). Thanks Anthony On Sat, Aug 31, 2013 at 7:04 PM, Florin Patan wrote: > 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 > --047d7bacbb5cb48f1404e54674a5--