Send me your list of D gripes and wishes

JN 666total at wp.pl
Mon Jan 2 22:27:19 UTC 2023


On Sunday, 1 January 2023 at 09:52:55 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
> When it comes to style, people are not going to be happy, no 
> matter what you pick.
>
> You don't need to put too much work into the set of rules due 
> to this.
>
> In our case we have declared what the style should be for the 
> dlang/ repos. So... that's what the tool must do.

I've been part of some C++/Python codebases which transitioned to 
enforced clang-format/black formatting and in the end it was a 
good decision. Turned out everyone's personal code style isn't so 
precious after all and with modifying a few rules in the 
formatter you can adopt a formatting style that is acceptable for 
majority of folks. Also, every sourcecode formatter allows you to 
opt-out of auto-formatting for blocks of code, which is useful 
for manual tables and alignment.

In my personal D projects I have set dfmt to run on each source 
code file save and never really had to worry about formatting. I 
just write whatever, ctrl+S and get a nicely formatted D code. I 
may disagree with the way it formats things sometimes, but I just 
accept it as a minor tradeoff for convenience.


More information about the Digitalmars-d mailing list