Re: Programming to an Interface
- From: Robert Martin <unclebob@xxxxxxxxxxxxxxxx>
- Date: Sun, 28 May 2006 13:15:07 -0500
On 2006-05-15 08:42:00 -0500, contravariance@xxxxxxxx said:
I never ever use the abstract keyword in Java and I never use
implementation inheritance either (note that Java's creator
emitted regrets not having gone "pure interface" [sic]). This at
least shows that it's possible to completely bypass implementation
inheritance when programming in Java.
Yes, it's possible to avoid using abstract; and without multiple inheritance there is considerable reason to avoid abstract. But I still use it. Every so often I get into a jam where I wish I could multilply inherit, or pull all my methods up to an interface. But these events are rare, and manageable. For the most part, abstract classes are very useful beasts.
--
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 |
.
- References:
- Programming to an Interface
- From: GoogleEyeJoe
- Re: Programming to an Interface
- From: contravariance
- Programming to an Interface
- Prev by Date: Re: Programming to an Interface
- Next by Date: Re: Programming to an Interface
- Previous by thread: Re: Programming to an Interface
- Next by thread: Re: Programming to an Interface
- Index(es):
Relevant Pages
|
|