This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]