Boost logo

Boost :

Subject: Re: [boost] clang-format file
From: Michael Caisse (mcaisse-lists_at_[hidden])
Date: 2018-01-22 20:00:11


On 1/19/18 04:08, Seth via Boost wrote:
> On 19-01-18 10:17, Stuart Dootson via Boost wrote:
>> On 19 January 2018 at 06:22, Frédéric via Boost <boost_at_[hidden]>
>> wrote:
>>
>>>> I was wondering if someone has a .clang-format file that works fine to
>>>> check boost code.
>>> It would be great to have the same presentation in every file!
>>>
>>>
>> You could try using Unformat (https://github.com/johnmcfarlane/unformat) to
>> generate one from the Boost code base... And then run the Boost code base
>> through it to make it fully consistent with it ;-)
>>
> I completely don't expect any consistent style(s) to emerge. Moreover
> heavy template/macro chicanery is usually exeptional - or suffers badly
> in terms of readability.
>
> In short, no there won't be a format that works. Even if you decide on
> one, that would mean that **all** libraries take massive change-sets to
> adhere to it, which wreaks havoc with respect to merge/diff stability, IME.
>

+1

*Please* do not mess up the source code. Some of us believe that there
is an art involved to writing beautiful code. The white space formatting
of heavy template code, macros, and EDSL's makes the code understandable
to humans.

Clang-format and other such tools destroy readability and understanding
in many code bases. Don't believe me? Take a look at well written Proto,
Spirit, MSM, or MPL/Fusion heavy sources written by someone who believes
that code should be beautiful. Now run it through your favorite
format-tool and observe the horrible mess that emerges.

michael

-- 
Michael Caisse
Ciere Consulting
ciere.com

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