This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: "Documentation by paper"
On Mon, Feb 02, 2004 at 05:10:04PM +0000, Jamie Lokier wrote:
> Joe Buck wrote:
> > Robert, the Ada interface description is far from a spec, for any
> > nontrivial function. Almost any real spec will describe restrictions
> > on input, and guarantees about the output, that are not written
> > in a form that the compiler parses (even in languages like Eiffel with
> > support for preconditions and postconditions). This means that we
> > are back to comments.
>
> I would add that a real spec tells you what the function _does_ and
> sometimes how to use it, in addition to pre/postconditions :)
Taken generally enough, "what the function _does_" == "postconditions",
"how to use it" == "preconditions".