80-column width [WAS: Re: indent]

Chris Shoemaker c.shoemaker at cox.net
Fri Mar 9 15:46:52 EST 2007


On Fri, Mar 09, 2007 at 10:16:47AM -0500, Josh Sled wrote:
> On Thu, 2007-03-08 at 23:46 -0500, David Hampton wrote:
> > -l80	Line width of 80.
> 
> This one I find problematic.  I understand the arguments for it, and
> have made them myself.  But identifiers and type names are just too long
> these days.  An 80-char limit can cause frequent and unnatural
> line-breaking; I think 100-char limit is more realistic.
> 
> I do think a 80-char limit is a good guideline ... but an unbroken
> (e.g.) 95-character line is better than an 80-character line followed by
> a 15-character line.
> 
> See the attached example of over-zealous wrapping differences of
> gnc-plugin-page-register.c.
> 
> If we persist, I think we should have a convention for where the '='
> goes, and that is at the beginning of the next line (like other
> "continuing" operators).

Let me speak up in favor of the 80-char limit.  However, I'm okay with
treating it as "strongly encouraged" rather than rigorously enforced.

I'm sympathetic that, sometimes, overrunning the 80-char limit is less
unreadable than some of the obvious line-wrapping alternatives.  

In order to make the overruns as rare as practical, I think we should:

  1) encourage the use of the static functions prefixed with the "acronym-ed"
name of their gtype "receiver". e.g.  gppr_close_helper() instead of
gnc_plugin_page_register_close_helper(); and

  2) encourage wrapping after the open parenthesis, e.g.:

    foo_is_a_short_name = but_these_names_are_rather_too_long(
        argument1, argument2, argument3, argument4);

Do the ident settings permit 2)?

-chris


More information about the gnucash-devel mailing list