Incomplete draft: do not cite!

If you have taken a CS theory class, or if you simply have a cynical nature, this might seem too good to be true.  And indeed, there are a number of caveats.  So let’s discuss these at the outset.

The first thing to admit to is that writing a spec can be as hard, or sometimes harder, than writing a program.  Specifications that are precise enough for a computer to understand are by definition formalisms, and the process by which people translate their intuitions and everyday language into those formalisms is can be error-prone.  Declarative programming is still programming.  Specs are often shorter than the original program, and in many cases that means less effort than writing an algorithm.  That said, we’ve all had the experience of changing a shorter program into a longer one because it’s simply easier to understand.