Re: A little coding style nugget of joy

From: Scott Preece
Date: Thu Sep 20 2007 - 10:04:21 EST


On 9/20/07, Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> wrote:
> On Thu, 20 Sep 2007, Pádraig Brady wrote:
>
> > Matt LaPlante wrote:
> > > Since everyone loves random statistics, here are a few gems to give you a break from your busy day:
> > >
> > > Number of lines in the 2.6.22 Linux kernel source that include one or more trailing whitespaces: 135209
> > > Bytes saved by removing said whitespace: 151809
> > > Lines in the (unified) diff: 455437
> > > Size of the diff: 15M
> > > People brave enough to submit the patch: ~0
> >
> > It's gradually getting better so:
> > http://lwn.net/2001/1129/a/whitespace.php3
>
> and you wouldn't *believe* how much space you can save by getting rid
> of all that annoying indentation. and don't even get me *started* on
> those comments ...
>
> rday
---

I think you're on to something here. If we stored the files with all
the non-meaningful whitespace (including non-meaningful newlines)
removed, not only would we save disk space, but we would also
eliminate significant amounts of developer time and LKML bandwidth
currently expended on arguing about formatting. Everybody could just
run things through indent with whatever formatting they preferred.
Might make diffs ugly, though...

scott
--
scott preece
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/