Warning: mysqli::__construct(): (HY000/2002): No connection could be made because the target machine actively refused it. in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (2002) No connection could be made because the target machine actively refused it.
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <vtvto2$15otp$1@dont-email.me>
Deutsch   English   Français   Italiano  
<vtvto2$15otp$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!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: Sat, 19 Apr 2025 11:26:11 +0100
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <vtvto2$15otp$1@dont-email.me>
References: <vspbjh$8dvd$1@dont-email.me> <20250410080629.532@kylheku.com>
 <vt94q5$3jjod$1@dont-email.me> <vt9628$3hhr8$3@dont-email.me>
 <vtammh$174ev$1@dont-email.me> <vtavn9$1dp7m$3@dont-email.me>
 <vtb8nv$1plb2$2@dont-email.me> <vtba81$1qfbm$1@dont-email.me>
 <vtbc6o$1te2o$1@dont-email.me> <vtbhjv$24api$1@dont-email.me>
 <vtbn2k$293r1$1@dont-email.me> <vtc19j$2kqlj$1@dont-email.me>
 <87a58mqt2o.fsf@nosuchdomain.example.com> <vtc7mp$2q5hr$1@dont-email.me>
 <vtcqf6$3j95s$1@dont-email.me> <vtdh4q$b3kt$1@dont-email.me>
 <vtf7fe$1qtpg$1@dont-email.me> <vtgfuf$31ug1$1@dont-email.me>
 <20250413072027.219@kylheku.com> <vtgpce$39229$1@dont-email.me>
 <vti2ki$g23v$1@dont-email.me> <vtin99$vu24$1@dont-email.me>
 <vtiuf0$18au8$1@dont-email.me> <vtj97r$1i3v3$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 19 Apr 2025 12:26:11 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="5c7860f03a8e4f1e49f90b82bdb5768f";
	logging-data="1237945"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18mYfSBmIbPSX7W0SUEt0aH"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:qRF8eahozeqlsExKZOM9W5WxGqk=
In-Reply-To: <vtvfop$rf2p$1@dont-email.me>
Content-Language: en-GB
Bytes: 3924

On 19/04/2025 07:27, Janis Papanagnou wrote:
> On 19.04.2025 00:27, bart wrote:

>> So, yes, I think that is problematic, and the fault is with the
>> language. This stuff isn't not hard to get right; even BASIC manages to
>> FOR-loops properly.
> 
> As so often explained to you, BASIC has a most primitive loop.[*]

As has been so often pointed out, the vast majority of iterating loops 
can be accommodated by 'for i = a to b'. So in that case it is not 
primitive.

However C's for-loop genuinely *IS* primitve.

> If that's all you can intellectually handle you're obviously a lousy
> programmer (and far from a software engineer).

Do you undertand my reasons for saying what I do?

Suppose that C had both its primitive loop, and one like Basic's (or 
like Awk's); would that be better? If so, why?

In fact, WHY does Awk have that other kind of loop? Since the primitive 
form can express it just as well.

What are the advantages? Say somebody said, if you can't express a loop 
using C-style, and need to rely on 'for-in', then you're a lousy programmer.

Let's go the other way and say C had no loops at all, and somebody 
advocating for loop statements was told that if they couldn't handle 
'if', 'goto' and labels, then *they* were a lousy programmmer?

Your arguments are ludicrous, sorry.

Effectively you are arguing for there to be no higher level languages, 
because anyone who wants them must also be incapable of understanding 
and using what there is.


> It could be so simple; don't use "C" and all your problems are gone.
> (Well, at least all your "C" related problems.)

Ha! I generally don't.

The 1% of my coding that involves actual C is enough.

> If you cannot handle elementary things you should give up programming.

I've written many 10s of 1000s of lines of assembly. But I prefer HLL 
code, and HLL code which has some must-have fundamentals. Like a fucking 
loop that works.