Open zTrap opened 1 year ago
Actually it is the best practice for all public shared code 🙂 Dividing makes able to use kotlin's interface delegation e.g
class SharedCache<K, V>(impl: CacheWrapper<K, V>) : CacheWrapper<K, V> by impl, AnotherInterface
Also after this changes both wrappers will be acceptable for wildcards. Since they implements single parent interface CacheWrapper<K, V>
I'm not really a fan of interfaces where they are not needed. You can easily test code using the caeffine builder, since it's in memory, so the "mock" use case isn't needed. What else is having an interface buying us?
What's the context for this change ?