Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46094 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67906 invoked from network); 19 Nov 2009 02:23:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Nov 2009 02:23:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=jared.williams1@ntlworld.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jared.williams1@ntlworld.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ntlworld.com designates 81.103.221.49 as permitted sender) X-PHP-List-Original-Sender: jared.williams1@ntlworld.com X-Host-Fingerprint: 81.103.221.49 mtaout03-winn.ispmail.ntl.com Solaris 10 (beta) Received: from [81.103.221.49] ([81.103.221.49:8671] helo=mtaout03-winn.ispmail.ntl.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4F/D2-50005-72CA40B4 for ; Wed, 18 Nov 2009 21:23:36 -0500 Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20091119022333.GUHY17277.mtaout03-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com>; Thu, 19 Nov 2009 02:23:33 +0000 Received: from p2 ([82.0.126.169]) by aamtaout02-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20091119022332.GFJH21638.aamtaout02-winn.ispmail.ntl.com@p2>; Thu, 19 Nov 2009 02:23:32 +0000 To: "'Robert Lemke'" , Date: Thu, 19 Nov 2009 02:24:01 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: Thread-Index: AcpoaUC1EIg0sRhwQ6Wji8a30jj7RQAVejWw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325 Message-ID: <20091119022332.GFJH21638.aamtaout02-winn.ispmail.ntl.com@p2> X-Cloudmark-Analysis: v=1.0 c=1 a=xZNAHpSts0UA:10 a=-q0cZcF2AAAA:8 a=67BIL_jfAAAA:8 a=TN_4c-5mPqdAQjDnMd8A:9 a=YceNDd93eZ2KG8L2ESYA:7 a=w5gaOg3sKRPkTpPChSG44DmwqFMA:4 a=5nBlCf5-gboA:10 Subject: RE: [PHP-DEV] RFC: Custom Factories (SPL) From: jared.williams1@ntlworld.com ("Jared Williams") References: > -----Original Message----- > From: Robert Lemke [mailto:robert@typo3.org] > Sent: 18 November 2009 16:07 > To: internals@lists.php.net > Subject: [PHP-DEV] RFC: Custom Factories (SPL) > > Hi folks, > > after discussing the idea with various PHP developers I now > felt safe enough that it's not a completely stupid idea to > post an RFC for it. The idea is to add support the > registration of custom factories which are responsible for > instantiating certain classes. > > Here is the first draft of my RFC: > http://wiki.php.net/rfc/customfactories > > I suggest that we first discuss the implications and > usefulness of this feature. In a second step I'd need to find > some skilled internals wizard who can implement it, because > not being a C developer myself, all I can offer is making > suggestions and fine coffee. > > Looking forward to hearing your comments! > Robert > > -- > Robert Lemke > Fluent Code Artisan > Whilst I am a fan of IoC, I don't think its desirable to add language features just to make legacy code more flexible. Surely the route to take is to refactor the legacy code as and when the extra flexibility is needed. Also seems like a possible whole heap of wtf?! When a seemingly absolute statement $a = new A(); gets mangled behind the scenes. Jared