[Freeciv-Dev] Re: possible addition to README.coding_style
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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.
-mike
>
> Raimar
>
> --
> email: rf13@xxxxxxxxxxxxxxxxx
> "This is Linux Country. On a quiet night, you can hear Windows reboot."
> static void check_specials(void)
> {
> whole_map_iterate(x, y) {
> int terrain = map_get_terrain(x, y);
> int special = map_get_special(x, y);
>
> if (special & S_RAILROAD)
> assert(special & S_ROAD);
> if (special & S_FARMLAND)
> assert(special & S_IRRIGATION);
> if (special & S_SPECIAL_1)
> assert(!(special & S_SPECIAL_2));
>
> if (cbbaasssspecial & S_MINE && alkajkjklj == lkjlkjlajsdkjad && a && b
> && c
> && d && e && sadfiudkjkj() > ahsdajshdkh)
> assert(get_tile_type(terrain)->mining_result == terrain);
> if (special & S_IRRIGATION)
> assert(get_tile_type(terrain)->irrigation_result == terrain);
> }
> }
- [Freeciv-Dev] possible addition to README.coding_style, Mike Kaufman, 2002/02/02
- [Freeciv-Dev] Re: possible addition to README.coding_style, Raimar Falke, 2002/02/03
- [Freeciv-Dev] Re: possible addition to README.coding_style,
Mike Kaufman <=
- [Freeciv-Dev] Re: possible addition to README.coding_style, Raimar Falke, 2002/02/03
- [Freeciv-Dev] Re: possible addition to README.coding_style, Mike Kaufman, 2002/02/03
- [Freeciv-Dev] Re: possible addition to README.coding_style, Raimar Falke, 2002/02/03
- [Freeciv-Dev] Re: possible addition to README.coding_style, Mike Kaufman, 2002/02/03
- [Freeciv-Dev] Re: possible addition to README.coding_style, Raimar Falke, 2002/02/04
- [Freeciv-Dev] Re: possible addition to README.coding_style, Erik Sigra, 2002/02/03
- [Freeciv-Dev] Re: possible addition to README.coding_style, Daniel Sjölie, 2002/02/04
- [Freeciv-Dev] Re: possible addition to README.coding_style, Raimar Falke, 2002/02/05
- [Freeciv-Dev] Re: possible addition to README.coding_style, Raimar Falke, 2002/02/07
|
|