2 ms·
Java uses this pattern in some places, for example you can usually pass a custom Comparator to anything that needs comparisons (like sorts). Fully separating i
by mike_hearn 4y ago
Java uses this pattern in some places, for example you can usually pass a custom Comparator to anything that needs comparisons (like sorts).
Fully separating implementation of an interface from the data can create quite a lot of additional complexities. See my comment elsewhere about encapsulation and version stability.