Sujet : Re: Loops (was Re: do { quit; } else { })
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 15. Apr 2025, 17:22:27
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vtm143$3ecf$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 21
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 15.04.2025 16:30, bart wrote:
On 15/04/2025 14:33, Kaz Kylheku wrote:
On 2025-04-15, bart <bc@freeuk.com> wrote:
* Not having to write the variable 3 times (with C not always being
able to detect if they didn't match)
>
This is indeed a source of errors in C nested loops.
According to Janis Papanagnou, it is 100% the programmer's fault. There
is nothing wrong with the language!
No, there is nothing wrong with the language if you make such errors.
The programmer selects (or constructs) the algorithm, the language has
clear semantics for such simple loop constructs without any irregular
or hidden semantics, and the programmer's task is to know the elements
of the language and transfer the algorithm to a correct coding. - It's
self-delusion if you try to blame the language for the mistakes you do.
Janis