tech-misc archive

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

argument names in function declarations



The style rules currently prohibit argument names in function
declarations. This is necessary for installed headers, because
otherwise legal but stupid things the user can do with cpp can cause
the declarations to blow up.

However, outside of that context, argument names, or at least some
argument names, serve as a useful form of documentation. While the
"vp" in "struct vnode *vp" doesn't add much value, writing "unsigned
flags" instead of just "unsigned" is actually useful, and IMO it
should be, if anything, encouraged.

Is this a good/bad idea? Should I propose specific text for
share/misc/style?

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index