# Greenspun's tenth rule **Greenspun's tenth rule** (despite there being no rules one through nine) is an aphorism by Philip Greenspun: "Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp." The observation is that complex programs inevitably need features that their host language does not provide: dynamic dispatch, garbage collection, eval, first-class functions, or a configuration language expressive enough to drive runtime behaviour. Rather than adopting a language that has these features, developers tend to reimplement them badly in whatever language the project started in. The canonical example is a configuration file format that starts as simple key-value pairs and, under pressure to support conditionals and loops, gradually grows into an ad hoc scripting language. Another is an embedded scripting system in a C application that is essentially a slow, poorly-typed, undocumented Lisp or Forth. The rule is not specifically about Lisp. It is about the gravitational pull toward general-purpose computation in any system complex enough to have dynamic requirements. The Lisp reference is historical and provocative; the substance is that ad hoc reimplementations of language features are usually worse in every dimension than using a language that has those features natively. In practice the rule is invoked as a caution against language NIH syndrome: before implementing a small interpreter, a rule engine, or a template language inside your C project, consider whether the right answer is to embed an existing scripting language (Lua, Python, Tcl) or to rethink the design.