Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-07-23 04:08:50

----- Original Message -----
From: "Vesa Karvonen" <vesa.karvonen_at_[hidden]>
> However, the main intent of my formatting style is to close the formatting
> code while retaining the code open for modification (the OCP principle).
> Consider the following abstract code template:
> a b
> aa bbbbbbbbbbbb
> aaaaaaa bbbbbbbb
> aaaaaaaaaaaaaa b
> Although the above example is simple, you should notice that it is
> formatted differently in order to make it easier to read:
> a b
> aa bbbbbbbbbbbb
> aaaaaaa bbbbbbbb
> aaaaaaaaaaaaaa b

I used to fall into that trap, and I'm aware of the pitfalls, but eventually
I decided that there were better ways to make code easy to read ;-)


> As you can see, the traditional formatting style forces the programmer to
> revisit (or open) the formatting of lines of code that were written (or
> closed) earlier. I really hate it.
> The problem is magnified by the fact that I continuously refactor code as
> write it. So, I try to format code so that it does not have to be
> revisited.

It is easy to remain "more traditional" than what you originally posted
without using any column-aligned formatting as you show in your second
example above. Anyway, that's all I was asking for. BTW, what does "out_ite"
stand for?


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