Greenspun's Tenth Rule

Greenspun's Tenth Rule of Programming is a common aphorism in computer programming and especially programming language circles. It states: [http://www.paulgraham.com/icad.html Revenge of the Nerds] , by Paul Graham.]

Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp. [ [http://philip.greenspun.com/research/ Philip Greenspun's Research ] ]

Origin

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 ] ]

Meaning

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.

Morris's Corollary

Well-known hacker Robert Morris later added the corollary:

…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 Lisp are written chiefly in Lisp itself, just as C compilers are usually written in C.)

Prolog follow-up

Any sufficiently complicated LISP program 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.

Generalization

The rule is often modified by replacing "Common Lisp" with the speaker's functional language of choice, such as Scheme or Haskell. It can also be generalized as:

Any sufficiently complicated platform contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of a functional programming language.Fact|date=April 2008

ee also

*Inner-platform effect
*Turing tarpit
*Zawinski's law of software envelopment

References


Wikimedia Foundation. 2010.

Look at other dictionaries:

  • Greenspun — may refer to: * Greenspun Media Group * Greenspun s Tenth Rule * The Greenspun CorporationGreenspun is the surname of: * Hank Greenspun * Philip Greenspunee also* Greenspan …   Wikipedia

  • Philip Greenspun — Infobox Scientist name = Philip Greenspun box width = image width = 100 caption = Philip and Alex, 1997, by Elsa Dorfman birth date = birth date and age|1963|9|28 birth place = Bethesda, Maryland, USA residence = Cambridge, Massachusetts… …   Wikipedia

  • Common Lisp — Paradigm(s) Multi paradigm: procedural, functional, object oriented, meta, reflective, generic Appeared in 1984, 1994 for ANSI Common Lisp Developer ANSI X3J13 committee Typing discipline …   Wikipedia

  • Lisp (programming language) — Infobox programming language name = Lisp paradigm = multi paradigm: functional, procedural, reflective generation = 3GL year = 1958 designer = John McCarthy developer = Steve Russell, Timothy P. Hart, and Mike Levin latest release version =… …   Wikipedia

  • List of eponymous laws — This list of eponymous laws provides links to articles on laws, adages, and other succinct observations or predictions named after a person. In some cases the person named has coined the law – such as Parkinson s law. In others, the work or… …   Wikipedia

  • Abstraction (computer science) — In computer science, abstraction is the process by which data and programs are defined with a representation similar to its pictorial meaning as rooted in the more complex realm of human life and language with their higher need of summarization… …   Wikipedia

  • Десятое правило Гринспена — (англ. Greenspun s Tenth Rule)  афоризм из области программирования, гласящий:[1][2] Любая достаточно сложная программа на Си или Фортране содержит заново написанную, неспецифицированную, глючную и медленную реализацию половины языка… …   Википедия

  • Feature creep — For the project management concept, see scope creep. Feature creep, creeping featurism or featureitis is the ongoing expansion or addition of new features in a product, such as in computer software.[1] Extra features go beyond the basic function… …   Wikipedia

  • Jamie Zawinski — Jamie W. Zawinski (born November 3, 1968 [ [http://jwz.livejournal.com/profile jwz Profile ] ] in Pittsburgh, Pennsylvania), commonly known as jwz, is an American computer programmer responsible for significant contributions to the free software… …   Wikipedia

  • Turing tarpit — Turing tar pit is a general term for a programming language designed to be Turing complete while in some sense simplifying to the greatest extent possible both the syntax and the semantics of the language. Such a language gives up certain… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”