Hi,
I see I opened an interesting discussion, but my original question was way
more inocent. I just wanted to format my code before sending it for review
:)
I agree for templates and even for long conditions it is better to be
flexible. I only expected very basic things to be declared like, how many
spaces for indentation, braces positions (next line or same line),
underscore_separated_names and not camelCase.
Since there is nothing, I will write one for my project and include it in
the review as an starting point.
Best regards,
Damian
2018-01-23 4:23 GMT-05:00 Niall Douglas via Boost
*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.
Best of course is that you write your source with clang-format always running, that way you can poke it as you go to not mess up formatting where appropriate.
But I have "ported" legacy codebases to clang-format in the past. It takes a few days, but thereafter it can be cronjobbed and never again do things like tabs or failure to follow the style guide ever occur again. In this situation, stick is much better than carrot. Give developers zero choice on formatting, then the problem becomes not a problem.
Niall
-- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/ mailman/listinfo.cgi/boost