Re: Coding conventions

Thomas Lord <lord-1tv/[email protected]> Tue, 2 Nov 2004 10:22:36 -0800 (PST)
Newsgroups gmane.lisp.scheme.pika.devel
Message-ID <[email protected]>
    > From: "Jose A. Ortega Ruiz" <jao-mXXj517/[email protected]>

    > Andreas Rottmann <[email protected]> writes:

    > > Hi!

    > > I'm just doing some evaluation of how merging the cports change into
    > > the main archive affects my newly added code, and, expectedly, there
    > > are some conflicts. Some of them would be avoidable if we stick to the
    > > exact same coding conventions -- well, we use the GNU style, so far,
    > > no issue, but jivera seems to use a window wider than 80 chars (just a
    > > wild guess ;)), and consequently doesn't line-break at 80 chars. Can
    > > we agree to do that (always break at 80 chars at most)?

    > Hi. That's actually my preferred convention re line lengths, so that'd
    > be OK with me.


Heavens.   This conversation is /sooo/ 1985.

Here's my problem with the 80 character convention:

1. I'm also in favor of long identifier names.
2. Line breaks among the arguments to a function call should not be
   randomly placed.


Thus, I'm often left with a choice between something like:


  frob (foomodule_munge (zap_param, x), bazmodule_grunge, expert_knobs () + 10, 0, 0)

and something like:

  frob(foomodule_munge (zap_param, x),
       bazmodule_grunge,
       expert_knobs () + 10,
       0, 0)

The former, combined with wide windows, let's me get (in this case) 
4x as many statements on the screen as otherwise!

I'm all for the 80-column restriction (actually a smaller limit) on
the parameter declaration part of a function definition (because I
expect that to be cut and pasted into documentation).  I'm in favor of
the 80-col restriction on the commentary text that comprises
documentation.   But for all those long function call statements: the
utility of wide windows seems dominant to me.

A roughly full-screen Emacs window should show must of the code that I
format in, at least roughly, the intended way.

In an emergency, deprived of anything but some ancient dec terminals,
I intend to print out pages of my code on a wide lineprinter and then
muddle through editting it on a VT-52 but, aside from that, I don't
seem to be suffering from the lack of interactive wide displays and
neither does nearly anyone else.  So why not take advantage of them?

-t