Indenting standards religions K&R, whitesmiths etc

Dukc ajieskola at gmail.com
Thu Jun 1 09:37:43 UTC 2023


On Wednesday, 31 May 2023 at 16:24:38 UTC, Cecil Ward wrote:
> I wanted to ask how some of the leaders of our group feel about 
> D indentation standards. `i realise that this causes some 
> religious fervour in C. I could be in trouble here because in 
> all my years at work, we never used K & R ‘one true brace 
> style’ indenting, with the house style I’m used to being more 
> like whitesmiths. Wikipedia explains this better. Something 
> like the following below.
>
> So my question: would I get lynched for the following? (below)

Check out this module from me: 
https://github.com/dukc/nuklearbrowser/blob/master/source/nuklearbrowser.d

Plus similar style in most of my posts and bug reports. I'm still 
alive :D.

Your code is your code. There, you may do as you wish. You have 
to aknowledge that an esoteric style may make it more difficult 
to read for some, but we're not lynching people for other factors 
of code readability either. Brace style is no different.

Plus, what brace style is considered readable by the majority is 
a culture issue. There has to be some way to challege the 
established culture. If you don't exercise your power to code as 
you wish, someone will make your choice for you. Coding culture, 
or even culture in general, cannot develop if people never 
challege the present status quo.

When you're coding with others, though, then you should obey the 
style guideline of that project if there is one. Even there 
you're as entitled as anyone for an opinion what the style policy 
should be (and to whether there should be style policy at all), 
but you then should (usually) obey the decision regardless 
whether it's the one you were advocating for.





More information about the Digitalmars-d-learn mailing list