Comment by taeric
16 hours ago
Fair that it can create some. But just allowing of nested loops already creates some of these. And, I know folks have tried to disallow loops, but that feels extreme.
Again, I would point to many of Knuth's descriptions as already allowing jumps forward and backward in steps as evidence that they can be useful.
When backward jumps are allowed you can create loops that are much more tangled and incomprehensible than when you are nesting the loop structures of modern languages.
With backward jumps, you can make multiple loops that are not nested, but you could visualize them as a complex graph that has sequences of instructions in the nodes and which has multiple cycles through which the execution may or may not pass and which intersect each other. Good luck to understand how the code works, because you cannot separate parts of it that can be understood independently, like when using the "structured programming" that is ubiquitous in modern programming languages.
Such indecomposable complex multiple loops were not uncommon before 1970 in languages like FORTRAN or COBOL, and precisely this kind of control structures were the reason why the use of GOTO was criticized and considered harmful.
I said that that was a fair claim. My only point on loops is you can already get some hairy explosions with "easy" to understand loops. Since those are effectively backwards jumps already.
That said, I disagree with your idea that you can't reason about it. You are just describing a flowchart that has several arrows going in different directions. Is it as easy as a flow chart that only has arrows in one direction? Of course not. But it is doable. In fact, if you allow jumping forward out of a loop, you already have most of this.
Now, can you make one that is so complicated that it can't be understood that well? Of course you can.