Re: Request for Comments: Horizontal Reuse for PHP
| From: | Stefan Marr | Date: | Thu, 15 Oct 2009 14:34:37 +0000 |
| Subject: | Re: Request for Comments: Horizontal Reuse for PHP | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-45824@lists.php.net to get a copy of this message | ||
Hi:
Has it been discussed to add a portion of the patch to HEAD? Hopefully, people can agree on a simple patch that ignores conflict resolution / aliasing solution and just adds: Ehm, hopefully not...?The power of traits is the explicit resolution of conflicts. And at least for me, that is the interesting part here. I agree that mixins (traits without explicit conflict resolution) are easier to begin with, but they have problem in the long run. Linearization introduces brittle architectures, which does not cope well with changes. Tom mentioned that he thinks that PHP6 is moving in a more strict direction, probably that is also motivated by the large systems already out there, for which people tend to prefer more strict language features. In this sense, an explicit conflict resolution is a must-have. Anyway, could I ask you to move your changes from the outdated RFC over to the one we are talking about? (http://wiki.php.net/rfc/horizontalreuse) Best Stefan PS: Is there a way to have a watermark or something which marks the old RFC as outdated? I don't want to delete it for documentation purpose...
trait User_Comments {} class App_Document with User_Comments {} // Or the original syntax class App_Email { use User_Comments; } The details of conflict resolution, if the use cases are strong enough can come later. Grafts well... the re-use is interesting but I worry about how php is going to evolve is you start offering that much flexibility. Just my thoughts, great work though.-- Stefan Marr Software Languages Lab Former Programming Technology Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://prog.vub.ac.be/~smarr Phone: +32 2 629 3956 Fax: +32 2 629 3525