Deutsch   English   Français   Italiano  
<vjecm6$22uqf$1@dont-email.me>

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

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: David Brown <david.brown@hesbynett.no>
Newsgroups: comp.lang.c
Subject: Re: question about linker
Date: Thu, 12 Dec 2024 11:08:05 +0100
Organization: A noiseless patient Spider
Lines: 56
Message-ID: <vjecm6$22uqf$1@dont-email.me>
References: <vi54e9$3ie0o$1@dont-email.me> <viasv4$nm7q$2@dont-email.me>
 <vibr1l$vvjf$1@dont-email.me> <vic73f$1205f$1@dont-email.me>
 <20241129142810.00007920@yahoo.com> <vicfra$13nl4$1@dont-email.me>
 <20241129161517.000010b8@yahoo.com> <vicque$15ium$2@dont-email.me>
 <vid110$16hte$1@dont-email.me> <vifcll$1q9rj$1@dont-email.me>
 <vifiib$1s07p$1@dont-email.me> <87ldwx10gv.fsf@bsb.me.uk>
 <vimtt4$27vv$1@dont-email.me> <86ser1kgp5.fsf@linuxsc.com>
 <vit69t$1qfgg$1@dont-email.me> <87ldwtzlc0.fsf@nosuchdomain.example.com>
 <vitjgg$1tukq$2@dont-email.me> <vj1bss$325uo$1@dont-email.me>
 <vj1h4i$335q1$2@dont-email.me> <vj1mhi$34p7h$1@dont-email.me>
 <vj1prj$35je4$1@dont-email.me> <vj7dup$he7i$1@dont-email.me>
 <slrnvlik4j.ns4.ike@iceland.freeshell.org> <vjcens$1kcos$1@dont-email.me>
 <vjcfnc$1kfcq$1@dont-email.me> <vjcftu$1kk6l$1@dont-email.me>
 <vjchk5$1kmm9$1@dont-email.me> <vjctmp$1n22j$3@dont-email.me>
 <vjcvlq$1n3n1$1@dont-email.me> <20241212000300.00001c20@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 12 Dec 2024 11:08:07 +0100 (CET)
Injection-Info: dont-email.me; posting-host="2863f8def60661e50375b2aa7b31e8ae";
	logging-data="2194255"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18Fja822npqn4viBER+J4KyzWIEjejv8cg="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.11.0
Cancel-Lock: sha1:vuEyFVD7gPH9inp0lFJN78GMPJA=
Content-Language: en-GB
In-Reply-To: <20241212000300.00001c20@yahoo.com>
Bytes: 3970

On 11/12/2024 23:03, Michael S wrote:
> On Wed, 11 Dec 2024 21:19:54 +0000
> bart <bc@freeuk.com> wrote:
> 
>>
>> This also comes up with 'while (cond); {...}'.
>>
> 
> $ cat foo.c
> void foo(int x)
> {
>    while (x--);
>      bar();
> }
> 
> $ clang-format < foo.c
> void foo(int x) {
>    while (x--)
>      ;
>    bar();
> }
> 
> Do I use clamg-format myself? No, I don't.
> 
> And I don't know why C formatters are generally less popular among C
> programmers then, for example, go formater among Go programmers or Rust
> formatter among Rust programmers.
> 
> 

I suspect that there is a great deal more variation in common styles and 
formatting amongst C programmers than amongst Go or Rust programmers. 
Part of that is the way people learned the language in the early days.

When C was new, there were lots of variants of the language, and lots of 
people using it quite independently.  They learned from colleagues, 
magazine articles, books, etc.  Tools were limited, and you often had a 
choice of writing clear code, or writing something that the tool would 
turn into efficient object code - not both.

With modern languages like Go and Rust, the internet was well 
established.  People learned from common sources - the Rust website, for 
example.  And tools were good from a much earlier stage, so you could 
get the habit of writing clear code rather than learning "tricks" to 
generate efficient results from poor tools.

So I think C programmers often got set in their ways from much earlier, 
while users of modern languages were more influenced by common sources. 
With less variation in the way code is written, it's a lot easier to 
agree on how code /should/ be written.

In the C world, if you ask five programmers how the "foo" function 
should be laid out, you'll get ten different answers - people are 
naturally less keen on a formatting tool that generates formats you 
disagree with!