Just for statistics, which C coding style do you use and why (if there is a reason other than just personal preference)? The Indian Hill Style (https://archive.org/details/indian-hill-c-style), the Linux Kernel Style (https://www.kernel.org/doc/html/latest/process/coding-style.html), other, your own style?
Ask HN: Which C style do you use?
1–4 of 4 posts
Re: Ask HN: Which C style do you use?
#2Kernighan and Ritchie, of course. https://en.wikipedia.org/wiki/The_C_Programming_Language
Example: https://upload.wikimedia.org/wikipedia/commons/2/21/Hello_Wo...
Re: Ask HN: Which C style do you use?
#3My preference is Allman https://en.wikipedia.org/wiki/Indentation_style#Allman_style
But I tend to use K&R or what ever the project I'm working on uses as no-one else uses Allman
Re: Ask HN: Which C style do you use?
#4My preference is Allman https://en.wikipedia.org/wiki/Indentation_style#Allman_style But I tend to use K&R or what ever the project I'm working on uses as no-one else uses Allman
Yes, Allman is the correct choice. With indents being 4 spaces and no tab characters.