4 ms·
I hate the phrase "law of leaky abstractions." Where is Joel's peer reviewed article containing a mathematical proof describing leaky abstractions?
by gfodor 16y ago
I hate the phrase "law of leaky abstractions." Where is Joel's peer reviewed article containing a mathematical proof describing leaky abstractions?
- jerf 16y ago"Where is Joel's peer reviewed article containing a mathematical proof describing leaky abstractions?" The proof is so obvious that it borders on a "by definition"... an abstraction is something that has had details removed from it. When those details are still important for some purpose, as they almost always are, your abstraction is leaky. When you suddenly have those purposes, you suffer. The idea of a non-leaky abstraction is almost nonsensical; if it doesn't leak at all it pretty much isn't an abstraction, it's an isomorphism.
- gfodor 16y agoThe leakiness of an abstraction sounds like its dependent upon the value of the details that are abstracted away. Clearly there are cases where these details don't matter. If those cases constitute 100% of the usages of the abstraction, then the abstraction doesn't leak. The point here is we're talking about a "principle" of un-intended abstraction leaks, not a "law of leaky abstractions", which sounds more authoritative than it should be and leads to shoddy thinking on the part of people who cite it as some immovable law.
- arethuza 16y agoI didn't think physical laws are amenable to proof in the mathematical sense - for a start that would presumably make them unfalsifiable so therefore not really scientific.
- radagaisus 16y agoHere is a proof in Haskell: https://gist.github.com/946245 https://gist.github.com/946245 The function fib is abstracting away all the details of calculating the nth member of the Fibonnaci Numbers. Sadly we are working with machines, not pure mathematical concepts - so when poor Bob will try to do something like [fib x| x <- [1..9999]] with the first implementation and will see his computer grinding to a halt he will have a leaky abstraction. Basically the law of leaky abstractions just says that if you don't know everything about the abstractions you use you will eventually get hit in the head by one of them.
- allwein 16y agoI like your example, and it's a good one for the specific case. I imagine a more formal proof would involve a reduction of any "non-leaky" abstraction to being capable of solving the halting problem, which is already proven impossible.
- nollidge 16y agoEuler proved it back in 1757 as a corollary of Murphy's Law.
- deleted 16y ago[deleted]