News for hackers. Stuff that matters.
Re:Message Passing, Duck Typing, Object Composition, and not... by jtregunna on Saturday January 01, 2011 @06:32PM (#2058812)
Inheritance is two language features in one though—It's implicit delegation and type polymorphism. Those two features need not be coupled together like that, and in fact, shouldn't in my opinion. It's not that silly things can be done with inheritance, it's more that people often use inheritance for one of two things, but rarely both: implicit delegation and type polymorphism. Pick your poison, and use the appropriate construct. I'm no fan of implicit delegation when I can get away with not having to deal with it, but I wish more languages would have an orthogonal construct for type polymorphism separate from inheritance.
Re:Message Passing, Duck Typing, Object Composition, and not... by joe_the_user on Saturday January 01, 2011 @07:26PM (#2058942)
You express the situation quite well here.

Are there any languages that do separate implicit delegation and type polymorphism?

Re:Message Passing, Duck Typing, Object Composition, and not... by ericbb on Saturday January 01, 2011 @07:42PM (#2058978)
Go does. See my other comment in this thread: http://news.ycombinator.net/item?id=2058963.
Re:Message Passing, Duck Typing, Object Composition, and not... by jtregunna on Saturday January 01, 2011 @08:10PM (#2059034)
As mentioned by ericbb, there is Go, yes. I've been working on another; a prototype based OO language without inheritance, explicit delegation and type polymorphism, but have nothing I want to show just yet.