DEV Community

Discussion on: How do you choose between an interface and abstract class?

Collapse
 
dubyabrian profile image
W. Brian Gourlie

My take: An interface is a contract, a class is a concrete representation of something, and an abstract class is a unecessary and limiting combination of the twoβ€”An additional language construct with a very specific use that can be accomplished naturally other ways.

Abstract classes are the bane of my existence in an inversion-of-control and TDD world.

Collapse
 
lovis profile image
Lovis • Edited

πŸ‘ "How do you choose between an interface and an abstract class?" You use an interface.