🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #1419

Re: p = {1,0,0}

#1419
From: bartc
Date: Tue, 10 Nov 2026 13:53
50 lines
3839 bytes
On 10/11/2026 12:50, David Brown wrote:
> On 10/11/2026 13:08, bartc wrote:

>> A language only needs to be real, not widespread, for the syntax 
>> choices to be valid. There is nothing wrong or ambiguous about the 
>> grammar used for my loop constructs.
>>
>> This kind of feature is one of the simplest to get right in a 
>> language, especially when it is 1-based.
> 
> The very fact that you think this is something to "get right" shows 
> where you go wrong in language design, language comparison, and language 
> discussions.

Then I don't understand your point here:

"it is far more difficult as you have to consider all conceivable corner 
cases or strange usage."

I directly support these kinds of loops:

    endless
    N-times
    while/repeat-until
    iterate over ranges or values
    (a fifth category not relevant here)

Given those, then the semantics and implementations can be 
straightforward. I can't see the corner cases you mentioned (except when 
operating at extreme integer values), therefore there is little to get 
wrong.

BTW, C only directly supports that third category as while/do-while.

Plus some construction it calls 'for', which is a kind of DIY toolkit 
for constructing any manner of weird and wonderful loops, that cannot be 
verified for correctness.

So did C 'get it right' here? Since there are so many ways for /users/ 
to inadvertently get it wrong while still ending up with valid syntax 
('for(i=0; j<=n; ++k)').

(I suggested you'd meant the lack of a statement like this in my 
projects. Well, I did have it for a year or two, but having /never/ used 
it, it got dropped.

Anyway, how does C get away with having 'while' both starting a loop 
statement, and ending one?!)

Technical Details
Message-ID: <11cv7lo$26k3l$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11c7f1j$20b9h$1@dont-email.me> <11c7fj6$20gab$1@dont-email.me> <11cae5m$318tq$1@dont-email.me> <11calrt$34gq3$1@dont-email.me> <11carqs$36m0o$1@dont-email.me> <11cb4hs$3a13l$1@dont-email.me> <11ccnkq$3pjhd$1@dont-email.me> <11ccobd$3ps4l$1@dont-email.me> <11cctee$3rtjh$1@dont-email.me> <11ccu0t$3s54f$1@dont-email.me> <11ccv4n$3sjn5$1@dont-email.me> <11cd05l$3t1er$1@dont-email.me> <11cd0q3$3ta28$1@dont-email.me> <11cd1vs$3tpfp$1@dont-email.me> <11cnve1$3ofei$1@dont-email.me> <11co8d4$3rpvm$1@dont-email.me> <14be9ea5-918f-5871-1bba-11e29e6e25d5@gmail.com> <11coqot$1236$1@dont-email.me> <11cplsf$8nc4$1@dont-email.me> <11cpnbb$97kp$1@dont-email.me> <11cpo21$9fji$1@dont-email.me> <11cpov5$9q2h$1@dont-email.me> <11cq3hb$dnf9$1@dont-email.me> <11ctijh$1mb1u$1@dont-email.me> <11ctr0o$1or07$1@dont-email.me> <11cukc4$1vnj7$1@dont-email.me> <11cv1ft$24amr$1@dont-email.me> <11cv3vb$257i8$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: bartc <bc@freeuk.com>
Newsgroups: comp.lang.c
Subject: Re: p = {1,0,0}
Date: Tue, 10 Nov 2026 13:53:59 +0000
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <11cv7lo$26k3l$1@dont-email.me>
References: <11c7f1j$20b9h$1@dont-email.me> <11c7fj6$20gab$1@dont-email.me>
 <11cae5m$318tq$1@dont-email.me> <11calrt$34gq3$1@dont-email.me>
 <11carqs$36m0o$1@dont-email.me> <11cb4hs$3a13l$1@dont-email.me>
 <11ccnkq$3pjhd$1@dont-email.me> <11ccobd$3ps4l$1@dont-email.me>
 <11cctee$3rtjh$1@dont-email.me> <11ccu0t$3s54f$1@dont-email.me>
 <11ccv4n$3sjn5$1@dont-email.me> <11cd05l$3t1er$1@dont-email.me>
 <11cd0q3$3ta28$1@dont-email.me> <11cd1vs$3tpfp$1@dont-email.me>
 <11cnve1$3ofei$1@dont-email.me> <11co8d4$3rpvm$1@dont-email.me>
 <14be9ea5-918f-5871-1bba-11e29e6e25d5@gmail.com>
 <11coqot$1236$1@dont-email.me> <11cplsf$8nc4$1@dont-email.me>
 <11cpnbb$97kp$1@dont-email.me> <11cpo21$9fji$1@dont-email.me>
 <11cpov5$9q2h$1@dont-email.me> <11cq3hb$dnf9$1@dont-email.me>
 <11ctijh$1mb1u$1@dont-email.me> <11ctr0o$1or07$1@dont-email.me>
 <11cukc4$1vnj7$1@dont-email.me> <11cv1ft$24amr$1@dont-email.me>
 <11cv3vb$257i8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 10 Nov 2026 13:54:01 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2314357"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19Sm85e8RRDdf5LRSKcqX6y"; posting-host="4695183c8b99665fc19e8d6c8d0d67a8"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:CMQbEivhuHggGeVK+K4HZSOWEsU= sha256:fVoZCLIoXJPI4gdqAMjSx2nT02D3CK+h1MfJUfnPqtc=
	sha1:N2ZrgLJCrFaYoCI6Z6iEOPq+Zu0= sha256:eEvpvsUUwUTi7wDAMWfw2/EnwCQ33D8m4DhjxVJo+Bk=
In-Reply-To: <11cv3vb$257i8$1@dont-email.me>
Content-Language: en-GB