[Top][All Lists]
[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. :-)
- [Bug-gnulib] safe-read.[ch] (safe_read): what do you think?, Jim Meyering, 2002/11/21
- Re: [Bug-gnulib] safe-read.[ch] (safe_read): what do you think?, Bruno Haible, 2002/11/21
- Re: [Bug-gnulib] safe-read.[ch] (safe_read): what do you think?, Jim Meyering, 2002/11/21
- Re: [Bug-gnulib] safe-read.[ch] (safe_read): what do you think?, Paul Eggert, 2002/11/21
- Re: [Bug-gnulib] safe-read.[ch] (safe_read): what do you think?, Bruno Haible, 2002/11/21
- Re: [Bug-gnulib] safe-read.[ch] (safe_read): what do you think?, Bruno Haible, 2002/11/22
- [Bug-gnulib] putting identical comments in both .c and .h files: what do you think?, Jim Meyering, 2002/11/23
- Re: [Bug-gnulib] putting identical comments in both .c and .h files: what do you think?, Bruno Haible, 2002/11/25
- Re: [Bug-gnulib] putting identical comments in both .c and .h files: what do you think?,
Paul Eggert <=
- Re: [Bug-gnulib] putting identical comments in both .c and .h files: what do you think?, Bruno Haible, 2002/11/26
- Re: [Bug-gnulib] putting identical comments in both .c and .h files: what do you think?, Paul Eggert, 2002/11/30
- Re: [Bug-gnulib] putting identical comments in both .c and .h files: what do you think?, Jim Meyering, 2002/11/27