4 ms·
A true leaky abstraction is where the behavior of the interface is forced to reflect some of the complexity of the implementation, but in a way that is surprisi
by yetanotherphd 13y ago
A true leaky abstraction is where the behavior of the interface is forced to reflect some of the complexity of the implementation, but in a way that is surprising given the rest of the interface.
I think most of his abstractions are not leaky, but they come at the cost of poor performance in certain cases.
In any case, his point is correct: it's hard to use complex systems to implement a simple interface, because it's hard to create the glue code so that the simple interface drives the implementation in the "right" way in every circumstance.
There is, of course, another approach that the author didn't mention, which is providing a mechanism in the interface for "hints", e.g. "please store this matrix in column-major format". That is not a perfect solution, but it is another tool for better abstractions.