Maybe this is just me, but it feels wrong.
The whole point of having interfaces in addition to abstract classes is that interfaces are “lightweight”. Interfaces don’t hold any behavioral burden as abstract classes do. They are just a set of methods, so they are easier for multi-inheritance. They are more flexible, because they give full control to their implementations.
You can argue that final default methods does not change this, but what if I would like to log usages of
area in my implementation? What about delegation? What about
Proxy? What if I would like to create a RPC based on such an interface? Should we just assume that this method does not exists for such cases? Then I think it is not really a part of this interface and we should use extension function instead.
Note that default methods themselves don’t affect cases like above. We can still delegate them, use
Proxy or add some logging as normal.
Having said that, I’m open to discussion. I may be biased towards existing solutions.