Hi: On 13 Mar 2010, at 00:37, Chris Trahey wrote:
> Perhaps a new concept in class-based OO programming, I'm not sure. > Depending on your perspective you could call it ancestor overloading (or > upstream overloading) or class underloading. Haven't read the term in this thread yet, so I felt obliged to mention it: what you want is called monkey patching[1]. Even so you present here a restricted 'language'-ified version of it, the general concept is still a fully reflective language. Gwynne already referred to Runkit, which gives you all the tools you need. However, since monkey-patching isn't something generally appreciate, I wouldn't go with promoting it to the language level. Instead, some Runkit functionality could be OO-ified and integrated into the Reflection API (somewhere along the lines of [2] perhaps). A technical issue with your proposal you do not address are conflicts. What happens when two classes overload the same class? Beside that, the best thing you could to for the moment is to convince the Zend framework guys to read up about Open Implementations[3]. Best regards Stefan [1] http://gbracha.blogspot.com/2008/03/monkey-patching.html [2] http://instantsvc.svn.sourceforge.net/viewvc/instantsvc/branches/metaprogramming/src/MetaPHP/Reflection2/class.php?revision=1076&view=markup [3] Gregor Kiczales, "Beyond the Black Box: Open Implementation," IEEE Software, vol. 13, no. 1, pp. 8-11, Jan. 1996, doi:10.1109/52.476280 -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php