News for hackers. Stuff that matters.
Re:Magic in software development by gfodor on Thursday April 28, 2011 @08:11AM (#2493000)
I hate the phrase "law of leaky abstractions." Where is Joel's peer reviewed article containing a mathematical proof describing leaky abstractions?
Re:Magic in software development by jerf on Thursday April 28, 2011 @11:37AM (#2493729)
"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.

Re:Magic in software development by gfodor on Thursday April 28, 2011 @03:29PM (#2494753)
The 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.

Re:Magic in software development by radagaisus on Thursday April 28, 2011 @08:30AM (#2493044)
Here is a proof in Haskell: 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.

Re:Magic in software development by allwein on Thursday April 28, 2011 @11:22AM (#2493670)
I 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.
Re:Magic in software development by arethuza on Thursday April 28, 2011 @08:16AM (#2493013)
I 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.
Re:Magic in software development by nollidge on Thursday April 28, 2011 @09:06AM (#2493124)
Euler proved it back in 1757 as a corollary of Murphy's Law.