Sujet : Re: Loops (was Re: do { quit; } else { })
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 18. Apr 2025, 13:41:02
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vtth94$31ec8$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 16.04.2025 13:32, bart wrote:
On 16/04/2025 06:35, Janis Papanagnou wrote:
On 15.04.2025 22:46, bart wrote:
On 15/04/2025 20:07, Scott Lurndal wrote:
[...]
Real for loops _are_ a three-way construct.
[...]
>
Any step other than 1 is unusual. [...]
Nonsense. Arithmetic loop steps other than one are noting unusual
and been supported by programming languages (and also been used)
since decades in programming.
So what are you claiming, that the majority of loops in any given
program will have steps other than +1 or -1?
No. I am saying that there's many ways to define and use 'for' loops,
and specifically "C" allows (by using an inherent primitive syntax)
to formulate many useful constructs that are also used regularly in
those languages that support such constructs.
As an implied consequence of that you may derive that if you use only
languages that don't support such constructs you must emulate them in
other ways in those languages. (This will naturally not be directly
countable in your preferred statistics.)
Also if you are using a language with more flexible 'for' loops but
you are not using that flexibility - because you haven't learned it,
you just don't grok it, or deliberately abstain from it because, say,
of some dogma that 'for' loops are only "real" 'for' loops if you use
them just in sequential traversing of integers with increments of 1 -
that you will also not see them.
[...]
But never, mind, C's for-loop will still be the most superior to
everybody here.
(I cannot speak for "everybody" as you seem to prefer.)
My own opinion I already stated more than one time; it boils down to:
I dislike "C" syntax in general. I like the flexibility of "C". The
latter is part of the reason why I use that syntactically "inferior"
language in some private programming.
I'd have an easier time arguing about religion!
(But you are arguing all the time in a religious manner already.)
Janis