DEV Community

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

Collapse
 
joelbennett profile image
Joel Bennett

Having taken a bit of a break from C# for a while, I think it has changed my perspective. Working in Python has got me thinking more in terms of functional programming. I'd now see this as the following:

  • Do you need state and behaviour? Use an abstract class.
  • Do you only need behaviour? Use an interface.