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
of
> 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
typically
> 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 ;-)

<snip>

> 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
I
> write it. So, I try to format code so that it does not have to be
continuously
> 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?

-Dave


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