bug-gnulib
[Top][All Lists]
Advanced

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

Re: New module argp-version-etc


From: Paolo Bonzini
Subject: Re: New module argp-version-etc
Date: Fri, 26 Jun 2009 15:42:36 +0200
User-agent: Thunderbird 2.0.0.17 (X11/20081009)


With Bruno's approach, a public function must
have *no* spec just before its definition, while each private one does.
That also depends on whether you insist on prototypes for all static functions. In that case, that's the place for specs of private functions, and *no* function has a spec before the definition.

Why would these two issues be correlated? The important thing for me is that
a user of a module only needs to read through the .h file, which is typically
much smaller than the .c file. If someone needs to know the documentation of
a 'static' function, he's in the situation of modifying the module, and he
better has read the entire .c file before he starts doing so. So, in this
case, it does not really matter where in the .c file the comments for 'static'
functions are located.

If you always have prototypes, the consistency argument of Jim can be solved by saying that *all declarations* have a comment no matter where they are and *no definitions* have a comment.

That's how I did in GNU Smalltalk for example.

Paolo




reply via email to

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