请输入您要查询的百科知识:

 

词条 Leaky abstraction
释义

  1. History

  2. The Law of Leaky Abstractions

  3. Effect on software development

  4. Examples

  5. See also

  6. References

{{Refimprove|date=March 2011}}

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

History

The 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 Abstractions

As 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 development

As 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.

Examples

Spolsky's article cites many examples of leaky abstractions that create problems for software development:

See also

References

{{DEFAULTSORT:Leaky Abstraction}}

1 : Abstraction

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/14 13:36:15