Leaky abstraction

From Wikipedia, the free encyclopedia

In software development, a leaky abstraction is an abstraction that leaks details that it is supposed to abstract away.[1]

As coined by Joel Spolsky, the Law of Leaky Abstractions states:[2]

All non-trivial abstractions, to some degree, are leaky.

This statement highlights a particularly problematic cause of software defects: the reliance of the software developer on an abstraction's infallibility.

Spolsky's article gives examples of an abstraction that works most of the time, but where a detail of the underlying complexity cannot be ignored, thus leaking complexity out of the abstraction back into the software that uses the abstraction.

Oops something went wrong: