词条 | Leaky abstraction |
释义 |
In software development, a leaky abstraction is an abstraction that leaks details that it is supposed to abstract away.[1] HistoryThe term "leaky abstraction" was popularized in 2002 by Joel Spolsky.[2] An earlier paper by Kiczales describes some of the issues with imperfect abstractions and presents a potential solution to the problem by allowing for the customization of the abstraction itself.[3] The Law of Leaky AbstractionsAs coined by Spolsky, the Law of Leaky Abstractions states: {{Cquote|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. Effect on software developmentAs systems become more complex, software developers must rely upon more abstractions. Each abstraction tries to hide complexity, letting a developer write software that "handles" the many variations of modern computing. However, this law claims that developers of reliable software must learn the abstraction's underlying details anyway. ExamplesSpolsky's article cites many examples of leaky abstractions that create problems for software development:
See also
References1. ^{{cite book|author=Seibel, Peter |title=Practical Common Lisp|url=https://books.google.com/books?id=dVJvr8PtCMUC&pg=PA96|date=1 November 2006|publisher=Apress|isbn=978-1-4302-0017-8|page=96}} {{DEFAULTSORT:Leaky Abstraction}}2. ^{{cite web|last=Spolsky|first=Joel|url=http://www.joelonsoftware.com/articles/LeakyAbstractions.html|year=2002|accessdate=2010-09-22|title=The Law of Leaky Abstractions}} - a blog post by Spolsky that asserts that all non-trivial abstractions are 'leaky' and therefore problematic. 3. ^{{cite web|last=Kiczales |first= Gregor |url=http://www2.parc.com/csl/groups/sda/publications/papers/Kiczales-IMSA92/for-web.pdf|year=1992|accessdate=2010-02-03| title=Towards a New Model of Abstraction in the Engineering of Software}} - a paper by Gregor Kiczales that describes the problem of imperfect abstractions and suggests a programming model for coping with them. 1 : Abstraction |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。