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

 

词条 Rule of least power
释义

  1. Rationale

  2. References

In programming, the rule of least power is a design principle that

"suggests choosing the least powerful [computer] language suitable for a given purpose".[1] Stated alternatively, given a choice among computer languages, classes of which range from descriptive (or declarative) to procedural, the less procedural, more descriptive the language one chooses, the more one can do with the data stored in that language.

This rule is an application of the principle of least privilege to protocol design.[2]

Rationale

Originally proposed as an axiom of good design, the term is an extension of the KISS principle applied to choosing among a range of languages ranging from

  • the plainly descriptive ones (such as the content of most databases, or HTML),
  • logical languages of limited propositional logic (such as access control lists),
  • declarative languages on the verge of being Turing-complete,
  • those that are in fact Turing-complete though one is led not to use them that way (XSLT, SQL),
  • those that are functional and Turing-complete general-purpose programming languages, to
  • those that are "unashamedly imperative".[1]

As explained by Tim Berners-Lee:[3]

Computer Science in the 1960s to 80s spent a lot of effort making languages that were as powerful as possible. Nowadays we have to appreciate the reasons for picking not the most powerful solution but the least powerful. The reason for this is that the less powerful the language, the more you can do with the data stored in that language. If you write it in a simple declarative form, anyone can write a program to analyze it in many ways. The Semantic Web is an attempt, largely, to map large quantities of existing data onto a common language so that the data can be analyzed in ways never dreamed of by its creators. If, for example, a web page with weather data has RDF describing that data, a user can retrieve it as a table, perhaps average it, plot it, deduce things from it in combination with other information. At the other end of the scale is the weather information portrayed by the cunning Java applet. While this might allow a very cool user interface, it cannot be analyzed at all. The search engine finding the page will have no idea of what the data is or what it is about. The only way to find out what a Java applet means is to set it running in front of a person.

References

1. ^{{ cite web | title = The Rule of Least Power | author = W3C | url = http://www.w3.org/2001/tag/doc/leastPower.html | accessdate = 2016-02-24}}
2. ^{{cite conference | date = 2011-12-28 | author = Meredith L. Patterson | authorlink = Meredith_L._Patterson | title = The Science of Insecurity | conference = 28th Chaos Communication Congress | url = https://events.ccc.de/congress/2011/Fahrplan/events/4763.en.html}}
3. ^{{cite web | authorlink = Tim Berners-Lee | author = Berners-Lee, Tim | url = http://www.w3.org/DesignIssues/Principles.html#PLP | title = Axioms of Web architecture | accessdate = 2002-01-14}}
{{refbegin}}
  • The Rule of Least Power, W3C, TAG Finding 23 February 2006
  • B. Carpenter, Editor: "Architectural Principles of the Internet" Internet Architecture Board, June 1996, RFC 1958
{{refend}}

4 : Software development philosophies|Software design|Programming language folklore|Software engineering folklore

随便看

 

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

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/20 12:25:06