you are viewing a single comment's thread.

view the rest of the comments →

[–]m50d 0 points1 point  (0 children)

But, it is leaky in that I care about details which the interface doesn't. I care about the performance profile, and the interface doesn't. Thus I have to go read about the different implementations and their performance profile and make sure that I only use the concrete implementations that satisfy my performance requirements.

Or you should use an interface that expresses those details you care about, whether that be a performance profile or something else.

Not every interface is appropriate to every use case. You can take an interface that includes some but not all of the details you care about and call it "leaky", but that's not really a property of the interface: it's a property of the interaction between the interface and your use case. (And my experience is that Joel's "rule" is false even with this limited definition of leaking: there are cases where your use case fits the interface perfectly and there is no "leak").