Greenspun's Tenth Rule
The observation that any sufficiently complicated program contains an ad hoc, informally specified, bug-ridden, slow implementation of half of Lisp.
Also known as: Greenspun's rule, Tenth Rule of Programming
Category: Software Development
Tags: software-development, programming, laws, complexity, languages
Explanation
Greenspun's Tenth Rule of Programming, stated by Philip Greenspun, holds that any sufficiently complicated C or Fortran program contains an ad hoc, informally specified, bug-ridden, slow implementation of half of Common Lisp. There are no rules one through nine; the numbering is part of the joke. The serious claim underneath is that large systems inevitably grow the facilities that dynamic, homoiconic languages provide by default: garbage collection, dynamic dispatch, closures, a plugin or macro system, a configuration language, runtime reflection, and eventually an embedded interpreter. Each of these arrives incrementally, invented in-house, without the design scrutiny that a language feature would receive. The rule is most useful as a diagnostic. When a codebase starts to include a bespoke expression evaluator, a hand-rolled dependency injection container, or a configuration format that has quietly acquired conditionals and loops, the team has begun building a language without admitting it. The choices at that point are to embrace it and adopt a real scripting language, or to recognise that the accidental language will never receive the tooling, documentation, or debugging support a real one has.
Related Concepts
← Back to all concepts