Sujet : Re: Loops (was Re: do { quit; } else { })
De : bc (at) *nospam* freeuk.com (bart)
Groupes : comp.lang.cDate : 15. Apr 2025, 11:15:06
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vtlbja$3f46a$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Mozilla Thunderbird
On 15/04/2025 05:57, Rosario19 wrote:
On Mon, 14 Apr 2025 14:18:39 +0200, Janis Papanagnou wrote:
(While there's some "C" stuff in here it contains a lot of non-"C"
samples for comparison. So [OT]-sensible folks may want to skip this
post.)
>
On 14.04.2025 12:16, bart wrote:
On 14/04/2025 05:23, Janis Papanagnou wrote:
On 13.04.2025 18:39, bart wrote:
[...]
>
for(let i = 1; i <= 36; i++) {
C for loop is great, but all can be workarounded with goto label
For this specific example (ignore 'let' for C), please explain why it is better than, say:
FOR(i,1,36) {
This is 99% of my for-loops. Is it the same reasoning why I have to write 'break' in 99% of my switch-blocks?
There's something about this group which celebrates these annoying language characteristics which are only useful or meaningful in a tiny minority of cases: see how wonderful it is for 1% of the time?
That must surely justify them being both a PITA and dangerously error prone in the vast majority of cases!