I'm trying to get my head around that, do you mean any for loop is bad or many nested loops?
I'm trying to get my head around that, do you mean any for loop is bad or many nested loops?
Abstracting away your iteration is important.
There is on rare occasion, however, sometimes a problem that is solved more clearly or handily using indexing, similar to step indexing in BASIC.
One use case where I've seen stepped indexing useful is in the field of robotics, which uses step characteristics for synchros and servos.
Using a Stream instead of a for loop does very little to make your code incompatible with C. It is already pretty much incompatible (modulo JNI).
What I mean is: if you want something that looks like C just use that, there is no gain in not learning new constructs just because older languages did not have them.