wordfor

leak·y ab·strac·tion

/ˈliː.ki æbˈstræk.ʃən/ (LEE-kee ab-STRAK-shun) noun

Software design

  1. An abstraction that fails to hide its underlying details, so users must understand the internals anyway. An ORM that forces you to understand the generated SQL to avoid N+1 queries is a leaky abstraction.

Origin

From Joel Spolsky's 2002 essay 'The Law of Leaky Abstractions': all non-trivial abstractions, to some degree, are leaky.

In practice

Document where an abstraction leaks (timeouts, ordering, cost) instead of pretending it doesn't. Callers will find out anyway.

Say to your AI

List the ways this wrapper leaks the underlying API: errors, latency, rate limits, ordering. Document each one in its docstring.

In plain words

  • the abstraction doesn't really hide anything
  • I have to know how it works underneath anyway
  • the wrapper exposes the underlying quirks

See also tight coupling separation of concerns

Find similar words