| Author |
Interface Inheritance
|
Timothy Sam
Ranch Hand
Joined: Sep 18, 2005
Posts: 746
|
|
|
Hi guys, I find myself using Inheritance through Interfaces more and more. Is this ok or is this as bad as Class inheritance?
|
SCJP 1.5
http://devpinoy.org/blogs/lamia/ - http://everypesocounts.com/
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24040
|
|
|
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.
|
[Jess in Action][AskingGoodQuestions]
|
 |
Timothy Sam
Ranch Hand
Joined: Sep 18, 2005
Posts: 746
|
|
|
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
Joined: Jul 08, 2003
Posts: 24040
|
|
|
Anything that makes code unnecessarily hard to understand is a bad thing, and excessively deep inheritance is one of those things.
|
 |
 |
|
|
subject: Interface Inheritance
|
|
|