Deutsch   English   Français   Italiano  
<vu6nnv$3apt8$2@dont-email.me>

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: bart <bc@freeuk.com>
Newsgroups: comp.lang.c
Subject: Re: Loops (was Re: do { quit; } else { })
Date: Tue, 22 Apr 2025 01:26:39 +0100
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <vu6nnv$3apt8$2@dont-email.me>
References: <vspbjh$8dvd$1@dont-email.me> <vtl166$36p6b$1@dont-email.me>
 <vtlcg0$3f46a$2@dont-email.me> <vtnekn$1fogv$1@dont-email.me>
 <vto2mb$20c4n$1@dont-email.me> <vtu4i5$3hteg$1@dont-email.me>
 <vtujko$3uida$1@dont-email.me> <vtvfop$rf2p$1@dont-email.me>
 <vtvto2$15otp$1@dont-email.me> <vu01k7$1bfv2$1@dont-email.me>
 <vu0720$1dva7$1@dont-email.me> <vu2hmg$3jn88$1@dont-email.me>
 <vu2mkc$3noft$1@dont-email.me> <vu5ig6$3catv$1@paganini.bofh.team>
 <vu5ol1$2h3r8$1@dont-email.me> <vu6bvn$3dsrl$1@paganini.bofh.team>
 <vu6iau$377r9$1@dont-email.me> <874iyh153g.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 22 Apr 2025 02:26:39 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="d044c27b80dbbae3d03ebae8688adc0f";
	logging-data="3499944"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/fPSSJ7ioAc83IlkzYyOyO"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ppcQIvheYnoSq9q02iNb9+IhlIw=
In-Reply-To: <874iyh153g.fsf@nosuchdomain.example.com>
Content-Language: en-GB
Bytes: 2981

On 22/04/2025 00:12, Keith Thompson wrote:
> bart <bc@freeuk.com> writes:
>> On 21/04/2025 22:06, Waldek Hebisch wrote:
>>> bart <bc@freeuk.com> wrote:
>>
>> t iteration goes over all elements in the hash table.
>>>    BTW2: When looking at 'for' loop you are supposed to see pattern,
>>> without need to track all steps.
>>
>> That's one of the disadvantages of using the same, often
>> /inappropriate/ keyword for every kind of pattern.
> 
> You think it's inappropriate.
> 
> Would your objections go away if a different keyword were used?

I already said that I would have prefered if 'while' was used.

Then either 'for' wasn't used, or was used for the kind of for-loop that 
is common in other languages.

> *You* find it much cleaner and simpler.  I don't.  What makes you right
> and everyone else wrong?

This is an interesting point: too much stuff on one line is usually 
frowned upon: multiple statements, multiple variables being declared etc.

But when it's a for-loop, then apparently anything goes.

> All three would be IMHO clearer if each of the three clauses were on a
> separate line.  The fact that you can write a badly formatted C-style
> for loop is not an argument against C-style for loops.

Complex loops are nearly always badly formatted and written on one line. 
Nobody cares. As you've demonstrated.