3 ms·
Here 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 t
by radagaisus 15y ago
Here 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 15y 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.