4 ms·
It's quite controversial in the real world where "each service class has an interface" is official codified dogma. OTOH in certain specific cases I see the val
by jsarasti 9y ago
It's quite controversial in the real world where "each service class has an interface" is official codified dogma.
OTOH in certain specific cases I see the value of the interface even for just one class when I want to clearly separate the contract (which I'm bound to fulfill now and in the future) and the implementation specific comments.
Let's say that in my little pet programming language I have just one List type. I want to clearly separate what's the contract (indexed ordered sequence) as opposed to "incidental" implementation details (constant cost random index access).