Boost logo

Boost :

From: Jody Hagins (jody-boost-011304_at_[hidden])
Date: 2005-07-15 11:16:51


On Fri, 15 Jul 2005 02:31:54 -0700
"Paul Mensonides" <pmenso57_at_[hidden]> wrote:

> So, the solution is to propogate the norm--which, BTW, is responsible
> for countless macro-related bugs over the years? How about we do it
> the right way, and have users of Emacs and vi fix their editors
> formatting algorithms?

More important than an editor is the writer and 1maintainer of the code.
 If something is supposed to expand to a complete statement, then it
should require a semicolon, because that is the normal protocol for
statements. If the macro does not expand to a full statement then it
should not require the semicolon... something else will follow anyway.

This provides editors and people with a good idea of a high level
understanding of what kind of code is being generated by the macro.

> It takes very little effort to manually format the code that you
> write, and any decent C++ programmer should be able to read the code
> formatted according to another's preferences--without reformatting it.
> I don't have a problem with
> tools like these, BTW. I have a problem with altering the purity of a
> code base when it isn't absolutely necessary.

However, you are advocating the same thing, but on the other side. From
my reading of your posts, you are advocating no semicolon at all,
because having one may propogate certain beliefs and ideas about
preprocessor programming.

I think a better alternative is a model of practice which states when
one should be used and when one should not be used. Neither extreme is
valid (always require, always forbid).


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk