Rule of least power
   HOME

TheInfoList



OR:

In programming, the rule of least power is a design principle that "suggests choosing the least powerful omputerlanguage suitable for a given purpose". Stated alternatively, given a choice among
computer languages A computer language is a formal language used to communicate with a computer. Types of computer languages include: * Construction language – all forms of communication by which a human can specify an executable problem solution to a comput ...
, 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. The Rule of Least Power is an example in context of the centuries older principle known as Occam's razor in philosophy. In particular, arguments for and against the Rule of Least Power are subject to the same analysis as for Occam's razor.


Rationale

Originally proposed as an axiom of good design, the term is an extension of the
KISS principle KISS, an acronym for "Keep it simple, stupid!", is a design principle noted by the U.S. Navy in 1960. First seen partly in American English by at least 1938, the KISS principle states that most systems work best if they are kept simple rather tha ...
applied to choosing among a range of languages ranging from * the plainly descriptive ones (such as the content of most
database In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases s ...
s, or
progressive enhancement Progressive enhancement is a strategy in web design that puts emphasis on web content first, allowing everyone to access the basic content and functionality of a web page, whilst users with additional browser features or faster Internet access ...
on the web), * logical languages of limited
propositional logic Propositional calculus is a branch of logic. It is also called propositional logic, statement logic, sentential calculus, sentential logic, or sometimes zeroth-order logic. It deals with propositions (which can be true or false) and relations b ...
(such as
access control list In computer security, an access-control list (ACL) is a list of permissions associated with a system resource (object). An ACL specifies which users or system processes are granted access to objects, as well as what operations are allowed on gi ...
s), * 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 language In computer software, a general-purpose programming language (GPL) is a programming language for building software in a wide variety of application domains. Conversely, a domain-specific programming language is used within a specific area. For exam ...
s, 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.


See also

* Worse is better


References


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 Software development philosophies Software design Programming language folklore Software engineering folklore