Deutsch   English   Français   Italiano  
<878qps2abs.fsf@onesoftnet.eu.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Ar Rakin <rakinar2@onesoftnet.eu.org>
Newsgroups: comp.lang.c
Subject: Re: Which code style do you prefer the most?
Date: Wed, 26 Feb 2025 17:51:19 +0600
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <878qps2abs.fsf@onesoftnet.eu.org>
References: <vpkmq0$21php$1@dont-email.me> <vpl2k4$24fmt$1@dont-email.me>
	<20250225104754.267@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Wed, 26 Feb 2025 12:51:20 +0100 (CET)
Injection-Info: dont-email.me; posting-host="3819d60e36b63f24b1100dea27559741";
	logging-data="2675633"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/b/29mypLcdtZJxnkKlsLqbBUcULIESZU="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:Rva4Rau0WGymjn/MU1ODZvJPYvI=
	sha1:5i/LV/2/rxXd1tadCQ0n0soZ5Eg=
Bytes: 2178

Kaz Kylheku <643-408-1753@kylheku.com> writes:

> On 2025-02-25, John McCue <jmccue@reddwf.jmcunx.com> wrote:
>> Ar Rakin <rakinar2@onesoftnet.eu.org> wrote:
>>> Hello there,
>>> 
>>> 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?
>>
>> GNU Style for me. 
>
> OP didn't properly characterize GNU style.
>
> GNU style is actually something like this:
>
>   if (flag)
>     {
>        switch (state)
>          {
>            case 42:
>              {
>                 state = 73;
>                 break;
>              }
>          }
>      }
>    else
>      {
>        statement;
>      }
>
> Four space indentation, but braces half-indent by two spaces.

Sorry, I should have showed this difference in my original post. I like
the GNU style except the weird indentation before the braces of control
statements. Not sure why they choose to indent that way.

The GNU style without indent before braces looks nice to me.