- Greenspun's Tenth Rule
Greenspun's Tenth Rule of Programming is a common
aphorismin computer programmingand especially programming language circles. It states: [http://www.paulgraham.com/icad.html Revenge of the Nerds] , by Paul Graham.]
Any sufficiently complicated C or
Fortranprogram contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp. [ [http://philip.greenspun.com/research/ Philip Greenspun's Research ] ]
The rule was written sometime around 1993 by
Philip Greenspun. Although it is known as his tenth rule, there are in fact no preceding rules, only the tenth. The reason for this according to Greenspun: "Sorry, Han-Wen, but there aren't 9 preceding laws. I was just trying to give the rule a memorable name." [ [http://philip.greenspun.com/bboard/q-and-a-fetch-msg?msg_id=000tgU 10th rule of programming ] ]
The interpretation is that programmers, constrained by low-level, primitive tools like C, often work around the limitations of their languages by inventing and implementing features found in more expressive languages such as Lisp.
Well-known hacker Robert Morris later added the
…including Common Lisp [http://store.yahoo.com/paulgraham/quotes.html Paul Graham quotes] .] .
This can be viewed as a commentary on the difficulty of creating an efficient implementation of the large and complex Common Lisp language, or simply a joke about LISP's eval function and the general commonality of recursion in functional languages. Both Greenspun's rule and Morris's corollary are examples of a characteristic style of hacker humor known as "ha ha only serious". [ [http://www.catb.org/jargon/html/H/ha-ha-only-serious.html Jargon File entry on "ha ha only serious"] ]
(Nonetheless, most Common Lisp systems are not written in C or Fortran. Exceptions exist, such as
GNU CLISP; however, systems such as Steel Bank Common Lispare written chiefly in Lisp itself, just as C compilers are usually written in C.)
Any sufficiently complicated
LISPprogram is going to contain a slow implementation of half of Prolog. [ [http://groups.google.com/groups?threadm=f08bdd6e-2f87-441a-8ba0-7406446ec153%4025g2000hsx.googlegroups.com comp.lang.prolog: why not use LISP-imp of Prolog as opposed to Prolog itself?] ]
Addresses the fact that pure Prolog programs are likely to include Lisp-like isles, and pure Lisp programs are likely to do the converse.
Any sufficiently complicated platform contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of a
functional programminglanguage.Fact|date=April 2008
Zawinski's law of software envelopment
Wikimedia Foundation. 2010.