Boost logo

Boost :

From: John Levon (levon_at_[hidden])
Date: 2002-09-09 19:56:07

On Mon, Sep 09, 2002 at 08:36:44PM -0400, David Abrahams wrote:

> My advice to you, Paul, if the abhorrence gets too strong, is to learn
> emacs -- you can get it do that tab/spaces round-trip conversion every time
> you open or save a file, or even just make groups of spaces "act like
> tabs".

Well since I completely failed to stop the flamewar, I may as well

This claim is wrong. emacs is not smart enough to deal well with various
indentation and layout constructs automagically. To do so would require
a full C++ parser with domain-specific knowledge of how for,if,while
constructs and the like are laid out in the project style.

You will inevitably find messed-up sources in some corner cases if you
try and use this automatic conversion in any editor that I've heard of.

For example (ignoring issues of whether this code is nice or not, it is
merely an example) :

        if (blah == Blah::BLAHBLAHBLAHBLAHBLAH
            foo == bleh) {

It's easy enough to teach the editor about this particular case (when
an if-condition is still open, deal with the string " "
as mixed tabs and spaces), but impossible for a variety of other layout

You really really do have to use real spaces in your editor to avoid
this problem. But this does not make it a big deal :)


"This *is* Usenet, after all, where virtually every conversation that goes on
is fairly ludicrous in the first place."
	- Godwin's Law FAQ

Boost list run by bdawes at, gregod at, cpdaniel at, john at