Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: possible addition to README.coding_style
Home

[Freeciv-Dev] Re: possible addition to README.coding_style

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raimar Falke <rfalke@xxxxxxxxxxxxxxxxxxx>
Cc: Freeciv-Dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: possible addition to README.coding_style
From: Mike Kaufman <mkaufman@xxxxxxxxxxxxxx>
Date: Sun, 3 Feb 2002 11:56:13 -0600

On Sun, Feb 03, 2002 at 05:55:54PM +0100, Raimar Falke wrote:
> On Sun, Feb 03, 2002 at 10:30:49AM -0600, Mike Kaufman wrote:
> > On Sun, Feb 03, 2002 at 12:10:22PM +0100, Raimar Falke wrote:
> > > On Sat, Feb 02, 2002 at 06:50:31PM -0600, Mike Kaufman wrote:
> > > > here's a one-liner that will stop indent from mangling a lot of code.
> > > > The guideline is 80 columns anyway (see the next line of the guide).
> > > > It still won't be perfect, but it'll be a lot better.
> > > > 
> > > > This patch is mainly to stop me from getting _as pissed_ when Raimar
> > > > decides to run indent...
> > > > 
> > > > so unless anyone vehemently objects...
> > > 
> > > Why? Get an editor with 80 columns (for example emacs) and load the
> > > attached file (generated with "indent -kr -i2 -l80"). You will see
> > > that in the long line you get a wrap around symbol. This is just ugly
> > > and unnecessary. What is your problem with -l75 (which is activated by
> > > -kr)?
> > 
> > hmm, interesting. vim doesn't do that (and I don't usually use emacs...)
> > fine, I would accept -l79 (which emacs does handle ok).
> > 
> > my problem is that -l75 wastes 6.25% of the file, (and still 5% if you
> > prohibit text in the 80th column, -l79) which is entirely unnecessary. 
> > For something like unncessary braces---which I also object to in certain
> > cases---at least they do increase readibility to some extent. -l75 decreases
> > readibility. It is far easier to read a one line statement than to follow 
> > it 
> > on to a second line, especially if it's only a fragment as indent likes to 
> > do.
> 
> I still prefer -l75. What about /* *INDENT-OFF*  */ and /* *INDENT-ON* */?

that's fairly silly, and completely destroys the purpose for which I
want to do this: I'll give a few examples which truly grate me:

  gtk_box_pack_start(GTK_BOX
                     (GTK_DIALOG(report_dialog->shell)->action_area),
                     report_dialog->btn_delete, TRUE, TRUE, 0);

vs.

  gtk_box_pack_start(GTK_BOX(GTK_DIALOG(report_dialog->shell)->action_area),
                     report_dialog->btn_delete, TRUE, TRUE, 0);


I suppose you would want?

  /* *INDENT-OFF*  */
  gtk_box_pack_start(GTK_BOX(GTK_DIALOG(report_dialog->shell)->action_area),
                     report_dialog->btn_delete, TRUE, TRUE, 0);
  /* *INDENT-ON* */

...

    gtk_box_pack_start(GTK_BOX(peditor->shell), action_area, FALSE, FALSE,
                       0);

vs.

    gtk_box_pack_start(GTK_BOX(peditor->shell), action_area, FALSE, FALSE, 0);


truly, please justify this preference.

-mike


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