Re: Mixins, Multiple Inheritance, Interfaces



On 2006-05-27 21:17:54 -0500, "Vladimir Levin" <vlad.levin@xxxxxxxxx> said:

I have to admit that it seems a shame that Java
did not implement mixins. Having now started using them in Ruby, I
think they're a really nice idea.

I quite agree. Java and C# missed a good bet when they ignored mixins. Granted, they are not easy to implement in statically typed languages. The "virtual inheritance" abortion in C++ is evidence enough of that. But even in C++ mixins were very useful. I miss them in Java.

--
Robert C. Martin (Uncle Bob)  | email: unclebob@xxxxxxxxxxxxxxxx
Object Mentor Inc.            | blog:  www.butunclebob.com
The Agile Transition Experts  | web:   www.objectmentor.com
800-338-6716                  |



.



Relevant Pages

  • Re: Static vs Dynamic
    ... Java doesn't seem to do mixins very well. ... An ideal world is left as an excercise to the reader. ... --- Paul Graham, On Lisp 8.1 ...
    (comp.lang.lisp)
  • Re: Is there a "Large Scale Python Software Design" ?
    ... to think about the MRO and the precedence rules. ... However I lack experience in Ruby with mixins: ... I am not talking about wrong design choice ...
    (comp.lang.python)
  • Re: Class vs. Object
    ... (I had to remind myself that Ruby isn't really single inheritance -- it has mixins and whatnot) ... Let's look at String now: ... # In this case it will find the method in Kernel. ...
    (comp.lang.ruby)
  • Re: How does xotcl compare to ruby?
    ... So Tcl + XOTcl is more OO than Ruby? ... meansing for certain language constructs. ... both have multiple inheritance and mixins. ...
    (comp.lang.tcl)
  • Re: Class instance variable idiom
    ... especially given Matz's point that inheritance in Ruby ... It's possible that mixins are well-designed and class ... def self.bufsize ...
    (comp.lang.ruby)