It's really just a matter of acclimation. The fact that the very first
The "issue" with RPG is that it has not direct idiomatic construct for the common "loop through all rows till eof of this or that condition", so it is naturally that opens the flank to many interpretations.
In many languages the common "till cursor EOFs" is i.e. a typically
while(theCursorLikeConcept.next()) [ loop...... ]
and it is rare to see different rendition, being compact.
in RPG the READ is an opcode and not a value returning expression amendable to expression inclusion likeDOW (READE); do things; ENDDO
Although I recall a similar construct proposed - and without piety rejected - in the IBM RFE portal time ago.
Fair enough, the side effects and status of a READ can be complex, so you need to allow flexibility, although is sometimes much more expressive to have the common expected behaviour expressed idiomatically and other conditions left for a an exception message handler.
To launch a tangent sometimes I think RPG with its defacto integrated database would be a nice fit for having some kind of integrated LINQ , compact list and functional expressions and reductions, compiled and checked (like native I/O), a sort of improved in-the-language SQL...
As an Amazon Associate we earn from qualifying purchases.