Re: RFC - "class underloading" -or- "ancestor overloading"
| From: | Olivier Hoareau | Date: | Fri, 19 Mar 2010 15:19:27 +0000 |
| Subject: | Re: RFC - "class underloading" -or- "ancestor overloading" | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-47428@lists.php.net to get a copy of this message | ||
Hi,
The feature specified by Chris remind me the "metaclass" extension system of
Groovy language (I am not a Groovy Expert, but properties seems similar).
+1 for this kind of feature at a language level, IMHO it will really help
for Aspect Oriented Programming, Legacy Code Refactoring, Unit Testing
(Mocking mecanism).
> Gwynne already referred to Runkit, which gives you all the tools you need.
>
IMHO Language-level features are much more appreciated in facts, and
Professionals pratices-required features (AOP, unit-test...) should be
language-level (in order for pratices to become more popular)
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).
>
+1
> A technical issue with your proposal you do not address are conflicts.
> What happens when two classes overload the same class?
>
Why "including/parsing" order should not be taken into account ?
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].
>
Thanks for the link(s) !
--
Olivier Hoareau
PHP Best Pratices Evanglist
Bordeaux, France