File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Interface Inheritance

 
Timothy Sam
Ranch Hand
Posts: 751
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, I find myself using Inheritance through Interfaces more and more. Is this ok or is this as bad as Class inheritance?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anything can be abused, of course. For example, a chain of interfaces extending other interfaces that went four or five deep would definitely make me raise an eyebrow. But in its place, inheritance of interfaces is a perfectly good tool in the toolbox.
 
Timothy Sam
Ranch Hand
Posts: 751
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kewl! So I can safely conclude that inheritance, interface or class when it goes down too deep could be a bad thing huh? Thanks!
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anything that makes code unnecessarily hard to understand is a bad thing, and excessively deep inheritance is one of those things.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic