| Deutsch English Français Italiano |
|
<877c5cpf3s.fsf@nosuchdomain.example.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: Which code style do you prefer the most?
Date: Wed, 26 Feb 2025 13:31:51 -0800
Organization: None to speak of
Lines: 38
Message-ID: <877c5cpf3s.fsf@nosuchdomain.example.com>
References: <vpkmq0$21php$1@dont-email.me> <vpl2k4$24fmt$1@dont-email.me>
<20250225104754.267@kylheku.com> <zWovP.1403558$21T3.838698@fx18.iad>
<vplf5d$26v09$1@dont-email.me> <874j0g2a8u.fsf@onesoftnet.eu.org>
<vpn3l8$2ipsc$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Wed, 26 Feb 2025 22:31:53 +0100 (CET)
Injection-Info: dont-email.me; posting-host="8884623bf32425c3c99b8c7d93ab032c";
logging-data="2885973"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19pNK7lDJVTKzphR0Oh/kX3"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:3AE68EvI6AO5MawWlmlNRnMgs0U=
sha1:xz5Q6SxcLTv0S3etekWvBsHvAgs=
Bytes: 2138
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
> On 26.02.2025 12:53, Ar Rakin wrote:
>> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
>>>
>>> Re "goofy style"; I've seen someone preferring
>>>
>>> while (q(a,b))
>>> {
>>> a=b;
>>> f(x);
>>> if (c>d)
>>> {
>>> g(y);
>>> }
>>> }
>>>
>>> To each his own.
>>
>> That looks like a nightmare for the code reviewers.
>
> I cannot tell where that comes from; the person who uses it is an
> experienced Perl programmer - may that be some convention in that
> specific language context? (I can't tell.)
No, that's not a Perl convention. Most Perl code uses K&R-style brace
placement
while ($condition) {
do_something();
}
One interesting feature of Perl is that the braces are required.
[...]
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */