Sujet : Re: Loops (was Re: do { quit; } else { })
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.lang.cDate : 23. Apr 2025, 16:41:39
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vub1nj$3d9kt$2@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 22 23
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0
On 22/04/2025 21:43, bart wrote:
On 22/04/2025 20:11, David Brown wrote:
On 22/04/2025 20:54, bart wrote:
Well C's would be:
>
For (first ingredient; ingredient; next ingredient)
>
The point was that you claimed your loop matches how you would describe things in English.
And it does exactly that. I get why people decide to go up several levels to try score some points, but we're not talking about AI here where we are trying to extract the exact algorithm that might have been in the mind of the programmer.
I think it was Djikstra who said that one of the most important skills for a programmer is a mastery of your mother tongue. You seem to be failing here.
No one is doubting your ability to translate some code directly into English words. What you are failing to do, however, is write a sensible, normal English language description of the task for the code, and then translate that into code. You can't expect people to take you seriously when you say a C for-loop does not match a normal English description when your own looping alternatives are equally bad matches.
Let me put it simply for you:
It is true that no one uses C for-loops in normal English.
It is equally true that no one uses while-loops in normal English.