9 Responses

  1. Ionuț G. Stan
    Ionuț G. Stan at | | Reply

    We’ve begun blogging again, eh? :)

    Anyway, not so fast with multiple inheritance. As long as it’s stateless it seems to be ok, although at that point you might not name it inheritance anymore.

    Java seems to go in that direction with interfaces that are allowed to provide default implementations (looks like abstract classes, but they’re not):

    http://news.ycombinator.com/item?id=2981465
    http://www.wiki.jvmlangsummit.com/images/a/a1/2011_Goetz_Extension_Slides.pdf

    PHP 5.4 has traits, which for better or worse allows solving the same problem of code reuse without the usual mutable state issues.

  2. scribu
    scribu at | | Reply

    Traits, introduced in PHP 5.4, should fix the problem of multiple inheritance once and for all:

    http://simas.posterous.com/new-to-php-54-traits

  3. Matt Kaufman
    Matt Kaufman at | | Reply

    LOL, I love your classes. They are truly actually perfect for what I wanted to implement to spec of PHP 5 4 new thoughts… also!

  4. The interface concept of c# – Why? | Svein Minde Blog

    [...] Multiple inheritance in PHP (motane.lu) [...]

  5. Dominic
    Dominic at | | Reply

    Is there a way to access ancestor variables?

Leave a Reply