> -----Original Message----- > From: Robert Lemke [mailto:rob...@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 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php