Rule of least power
In programming, the rule of least power is a design principle that "suggests choosing the least powerful [computer] language suitable for a given purpose". 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.
- 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".
As explained by Tim Berners-Lee:
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.
- W3C. "The Rule of Least Power". http://www.w3.org/2001/tag/doc/leastPower.html. Retrieved 2016-02-24.
- Meredith L. Patterson (2011-12-28). "The Science of Insecurity". 28th Chaos Communication Congress. https://events.ccc.de/congress/2011/Fahrplan/events/4763.en.html.
- Berners-Lee, Tim. "Axioms of Web architecture". http://www.w3.org/DesignIssues/Principles.html#PLP. Retrieved 2002-01-14.
- 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
Original source: https://en.wikipedia.org/wiki/ Rule of least power. Read more