This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: "Documentation by paper"
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: law at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 29 Jan 04 14:07:03 EST
- Subject: Re: "Documentation by paper"
Conceptually, an API should be usable without looking at the
implementation.
Most certainly!
In Ada, the specification and implementation are always in different files,
so that can actually be enforced.
You can that in C too, of course, by putting the specification into the .h
file and the implementation into the .c file, but the convention has been to
document the function's parameters in the .c file rather than .h.