bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnulib] putting identical comments in both .c and .h files: wha


From: Paul Eggert
Subject: Re: [Bug-gnulib] putting identical comments in both .c and .h files: what do you think?
Date: Mon, 25 Nov 2002 14:56:53 -0800

> From: Bruno Haible <address@hidden>
> Date: Mon, 25 Nov 2002 20:53:33 +0100 (CET)
> 
> This is also based on the respective frequency of these development
> actions:
>   1) [Frequent] Read the specification of a function.
>   2) [Less frequent] Read or update the implementation of the
>      function.
>   3) [Rare] Change the specification of a function.

But there's something even more common than those, namely:

    0) [Most frequent] Remind yourself about the specification.

By far the most common thing that I do is to remind myself about what
order the arguments are, or something like that.  So I tend to prefer
a .h file that is short and sweet.  I'd rather not wade through a .h
file that looks like a Unix man page; I'd rather glance at one that
looks like a Unix man page's synopsis.

One way to help keep .h files short is to put the descriptive comments
into the .c file only.  So I tend to agree with Jim on this one.
(Even though I have been guilty of some verbose .h files in the past.  :-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]