>There’s a well-known saying: "All abstractions leak." It’s true. No matter how good the abstraction, eventually, you’ll run into situations where you need to understand the underlying implementation details
This is false. One can read up on Theorem's for Free by Wadler to see that not all abstractions are leaky.
Theorems for Free tells you that some abstractions satisfy some mathematical properties (for free!) under some circumstances.
If you write down a function with signature
{T : Type} -> T -> T
then it must be the identity function, if you do not use "malicious" extensions of the type system.
But what is the performance of the identity function?
Here is an identity function:
lambda T, lambda t, if (2 + 2 = 4) then t else t
In other words: I can hide pretty much arbitrary computation in my identity function.
Users of my identity functuon will notice that it is wicked slow (in reality, I let my identity function compute Busy Beaver 5, before doing nothing). Their complaints are evidence of leaky abstraction.
Now you might have a smart optimizing compiler that knows about Thm4Free... But that's another story.
The point of the abstractions I'm talking about is not to abstract away the computation part of a program, it's to abstract away the types and complexities of the semantics.
I don't think you can have such compiler, at least for a general case, without solving the halting problem first. After all, you can encode arbitrary computations at the type level.
This has such potential to be an interesting thread of conversation but all I get is a reference to a book that I haven't read and am unlikely to.
What examples of non-leaky abstractions do you have?
I could imagine something like "newtonian physics" but that leaks into my daily life every time I fire up google maps and get a GPS fix.
The OP's example of TCP seems close to the mark, but to be totally honest I'm not convinced. Every time I have to run ping to check whether my hung connection is due to connectivity, I'm breaking the abstraction. And I've had to debug network issues with Ethereal (yes, I'm dating myself). TCP does leak, it's just that most people don't know what to do with it when it does.
This is false. One can read up on Theorem's for Free by Wadler to see that not all abstractions are leaky.