Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56262 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96136 invoked from network); 10 Nov 2011 23:13:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Nov 2011 23:13:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=davidkmuir@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=davidkmuir@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.44 as permitted sender) X-PHP-List-Original-Sender: davidkmuir@gmail.com X-Host-Fingerprint: 209.85.210.44 mail-pz0-f44.google.com Received: from [209.85.210.44] ([209.85.210.44:61006] helo=mail-pz0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 24/92-17932-C8A5CBE4 for ; Thu, 10 Nov 2011 18:13:16 -0500 Received: by pzk33 with SMTP id 33so6376038pzk.3 for ; Thu, 10 Nov 2011 15:13:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Wa+ETOvc5RWqf/+j2a6AhiHcJ/h009DrUWQHIFpswZo=; b=gh6ECkM2mxVO4Dtvodh+9AqbSee+hSrL+aDQ8mqtxyhcLrW7af2PIDpoP96illS4vC vOiNZZNlCltAcibxcpx/Gv0kOsA/k4OJJt4d1qVul1k7iAkUtyQSuV4vEZ4fbEBoBBHZ H0TojaXWetbn68iaz/yZsejKjUR7GLUoRbi7k= Received: by 10.68.15.225 with SMTP id a1mr18406411pbd.66.1320966793925; Thu, 10 Nov 2011 15:13:13 -0800 (PST) Received: from [192.168.1.181] (static-93-136.net2000.com.au. [203.32.93.136]) by mx.google.com with ESMTPS id b2sm25071308pbc.2.2011.11.10.15.13.11 (version=SSLv3 cipher=OTHER); Thu, 10 Nov 2011 15:13:13 -0800 (PST) Message-ID: <4EBC5A86.9050803@gmail.com> Date: Fri, 11 Nov 2011 10:13:10 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Anthony Ferrara CC: PHP Internals , guilhermeblanco@gmail.com References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] SPLClassLoader RFC Thoughts And Improvements From: davidkmuir@gmail.com (David Muir) Surprised to say that I agree on just about everything you mentioned. I would however love to see a useful autoloader included in core. I have only one comment below. > 4. The RFC should avoid implementing any pattern or style that may > make future feature addition difficult or pose risks towards such. An > example would be implementing an interface for the autoloader which > defines something like load($class). The problem there is that if > function autoloading is added, the interface won't be able to support > it. So it's stuck in a hard place between changing an implemented > interface (which will bork code significantly on update) and adding a > new interface (which would be the lesser of evils, but would just add > to the deprecated cruft). IMO, the interface should just define loadClass($class). It means that spl_autoload_register has a fixed target for loading classes, and if we want to support autoloading functions or whatever else later on, a new interface can be added that would define the appropriate method eg. loadFunction($function). Cheers, David