Sujet : Re: Which code style do you prefer the most?
De : rjh (at) *nospam* cpax.org.uk (Richard Heathfield)
Groupes : comp.lang.cDate : 04. Mar 2025, 16:18:32
Autres entêtes
Organisation : Fix this later
Message-ID : <vq75k8$1t6ut$2@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 04/03/2025 14:56, Anton Shepelev wrote:
Ar Rakin:
I've been writing C code for a long time, in different styles, but
always wanted to know which code style most people prefer. This is all
about that question. Which one of the following do you prefer the most?
1. GNU Style
2. Linux Style
I don't like them much. Below is a piece of my code
I don't like most of the choices you've made :-) *but* I can see perfectly good reasons for making those choices (if that's any consolation).
Just about the only choice of yours that I /do/ like is your brace placement:
{
{
{
}
}
}
which like because it makes the code's structure stand out so clearly. I know a lot of people criticise this style for being wasteful of vertical space, but I've never seen that as a problem. My screen can hold more than enough code to occupy me, and my annual vertical space bill is very reasonable.
-- Richard HeathfieldEmail: rjh at cpax dot org dot uk"Usenet is a strange place" - dmr 29 July 1999Sig line 4 vacant - apply within