[MPlayer-dev-eng] [RFC] Removing all trailing whitespace

Rich Felker dalias at aerifal.cx
Mon Aug 21 14:50:43 CEST 2006


On Mon, Aug 21, 2006 at 11:26:59AM +0200, Diego Biurrun wrote:
> On Sun, Aug 20, 2006 at 08:41:23PM -0400, Rich Felker wrote:
> > On Mon, Aug 21, 2006 at 02:38:48AM +0300, Ivan Kalvachev wrote:
> > > I'm also wondering about converting tabs to spaces (only .h and .c files ;)
> > 
> > I have no objection to doing this to files where tabs have been mixed
> > with spaces, but I strongly object to applying this to properly-tabbed
> > files. Files which use tabs correctly are much better with tabs.
> > 
> > Also note that the following (where _________ indicates a tab) does
> > not count as mixed tabs/spaces:
> > 
> > ________foo = 1 + bar(...
> > ________              ...
> > ________             );
> > 
> > but the following does:
> > 
> > ________foo = 1 + bar(...
> > ________________      ...
> > ________________     );
> > 
> > (The difference is that the former uses tabs as indention levels and
> > spaces for character-level alignment, while the latter mixes tabs and
> > spaces for character-level alignment assuming a tab is 8 spaces. The
> > former is very good style while the latter is an abomination!)
> 
> It's surely a scenario that breaks when using different tab widths, but
> I'd say it's just something that would have worked well if there had
> only been spaces in the first place ;-p

Spaces only DO NOT WORK WELL because it's very difficult to count
them, add/delete whole indention levels, etc. without a special
editor. Tabs just plain work.

> It's also very hard to keep this style consistent, once several people
> start editing and the code gets changed somebody will be less careful
> and mess it up for sure...

How? The only way it becomes inconsistent is if a person uses a broken
editor that munges tabs/spaces, like emacs in the default config...

Rich




More information about the MPlayer-dev-eng mailing list