The only reasonable concern imo is that because of an error it may loop too many times or even infinitely.
Wherever the number of passes is defined literally, as in my example, this is nothing but preconception.
Yes, agreed, and I wasn't saying it's wrong, it's a perfectly formed piece of code using available instructions.
But unfortunately that
preconception writes many company's "standards" that SI's have to adhere to.
You can often convince the "man-in-charge", but to get him to re-write even a small section of "standards" is impossible, so it stays. Hopefully the next guy to fill his shoes "sees the light", but even he won't touch "standards". They usually cost tons to develop, and he'll accept that they are what they are, they've already got loads of systems using them, their engineers are "comfortable" with them, so is the new guy going to rock the boat ? Unlikely, even if he truly believes it could be better, he will tend to leave well alone. Legacies can thrive into old-age for no other reason.
I will give you an example....
"Client" would not let us use a "function" (in this case, a subroutine), for handling over 200 automatic valves....
Each valve had something like 20 rungs of code for control and alarming, so our "Valve_Handling" routine had 20 x 200 rungs of code, that's 4000+, I kid you not. It's going back a few years, which is probably why we had to use PLC5/250's with their incredibly expensive memory modules (pre Logix5000).... Anyway, I digress....
His approach was "the engineers can't see what is going on", and despite arguments that they don't even need to connect up the programming terminal if only one valve is playing up, etc. etc.
Don't get me wrong, I have the greatest respect for this "client", but he would not budge from that standpoint.
Today, of course, we are more advanced and have things like AOI's which remove the tedium of repetitive blocks of code. We can write lots of "checking" algorithms into our handlers, and deliver more information to the HMI or SCADA than any amount of "engineer scrutiny" of the code could elicit.
We have sophisticated motor-cars that almost drive themselves, can park themselves, can tell you if you are wandering off your lane, can automatically detect the road surface for water, ice, snow, gravel, etc., can maintain the cabin temperature to within +/- 0.5 degrees, can navigate you to anywhere in the world, connect you to the web, let you share wifi with 6 scantily-clad girls, and if you believe the adverts, can stop the rain from falling.....
So why do people love Jeeps and Beetles ???