Common · Knowledge
Leaky abstraction
Software abstraction that leaks details that it is supposed to abstract away
A leaky abstraction in software development refers to a design flaw where an abstraction, intended to simplify and hide the underlying complexity of a system, fails to completely do so. This results in some of the implementation details becoming exposed or 'leaking' through the abstraction, forcing users to have knowledge of these underlying complexities to effectively use or troubleshoot the system.
From Wikipedia
A leaky abstraction in software development refers to a design flaw where an abstraction, intended to simplify and hide the underlying complexity of a system, fails to completely do so. This results in some of the implementation details becoming exposed or 'leaking' through the abstraction, forcing users to have knowledge of these underlying complexities to effectively use or troubleshoot the system. The concept was popularized by Joel Spolsky, who coined the term Law of Leaky Abstractions which states: All non-trivial abstractions, to some degree, are leaky. This means that even well-designed abstractions may not fully conceal their inner workings, and as computer systems grow more complex, the likelihood of such leaks increases. These leaks can lead to performance issues, unexpected behavior, and increased cognitive load on software developers, who are forced to understand both the abstraction and the underlying details it was meant to hide. This highlights a cause of software defects: the reliance of the software developer on an abstraction's infallibility. Despite their imperfections, abstractions are crucial in software development for managing complexity, even though they are not always flawless.
Text: Wikipédia, CC BY-SA 4.0. ·
Related cards
-
H★★
Hardware abstraction
Set of software routines that emulate platform-specific details, giving programs direct access to hardware resources in a device-independent, high performance manner
-
M★★
Magic (programming)
In computer programming, an abstraction that handles complex tasks while hiding that complexity to present a simple interface
-
C★
Convention over configuration
Software design paradigm
-
★
Leaky bucket
Network traffic shaping and policing algorithm
-
L★
Loose coupling
System in which each of its components has, or makes use of, little or no knowledge of the definitions of other separate components
-
P★★
Principle of least astonishment
Principle in computer system design