Sujet : Re: Loops (was Re: do { quit; } else { })
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 25. Apr 2025, 13:22:25
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vufuq2$3v10r$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 25.04.2025 10:29, Rosario19 wrote:
On Fri, 25 Apr 2025 07:46:21 +0200, Janis Papanagnou wrote:
Especially if you have backward 'goto's it's IMO worth to have
a second look on your iteration construct.
loops have always at last one backward 'goto'
No.
That's why loop _abstractions_ have been introduced in programming
languages, to *not need* _low-level_ loop representations appear in
high-level programming.
(You seem to be arguing on assembler level on von Neumann machines,
but that misses the point of a loop abstraction in loops constructs
as you find them in form of for, while, repeat, until, etc. in the
high-level languages. BTW, in your argumentation it would have been
more precise to have said that there's at least one 'JMP' *and* at
least one conditional jump, like 'JNZ', to implement loops on such
a low machine model level.)
Janis