I wonder is there is anything wrong conceptually with using interface with default methods as opposed to using an abstract class, given that I don't care about constructors and states?
r
ribesg
05/02/2019, 11:31 AM
If you can do what you want this way, then just do. Usually you need abstract classes because they contain private functions, properties and as you said, constructors
ribesg
05/02/2019, 11:32 AM
If what you’re doing works just with default implementations in interfaces then it should be safe. Using interfaces instead of abstract classes kinda allows multiple inheritance
➕ 1
👍 1
d
Dias
05/02/2019, 12:29 PM
oh yeah that one of the good reasons I was looking for actually, thanks
r
ribesg
05/02/2019, 12:30 PM
Well that’s if you think multiple inheritance is a good thing 😛
a
Alowaniak
05/02/2019, 1:53 PM
Also if you're using the interface for "easier" re-use of utility like methods then obv. don't do that