Greenspun's tenth rule

From Wikipedia, the free encyclopedia
  (Redirected from Greenspun's Tenth Rule)
Jump to: navigation, search

Greenspun's tenth rule of programming is an aphorism in computer programming and especially programming language circles that states:[1][2]

Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.

This expresses the opinion that the perceived flexibility and extensibility designed into the Lisp programming language includes all functionality that is theoretically necessary to write a complex computer program, and that the core implementations of other programming languages often do not supply critical functionality necessary to develop complex programs.

Origin[edit]

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.[3]

Morris's corollary[edit]

Well-known hacker Robert Morris later declared a corollary which clarifies the set of "sufficiently complicated" programs to which the rule applies:

…including Common Lisp.[4]

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. Both Greenspun's rule and Morris's corollary are examples of a characteristic style of hacker humor known as "ha ha only serious".[5]

See also[edit]

References[edit]