Re:Orange: A simple systems programming language
by protomyth on Friday June 26, 2015 @10:40PM
(#9788884)
The for in my example (which is directly from the linked page) is a while loop written in a compact form. My complaint is that a for loop should name a definite end number without a condition. I think the WHILE portion of the ALGOL-style for loop you give is problematic (and given the example unused). Having a condition as an end condition is error prone.
The C for loop was designed by looking at an ALGOL-style for loop:
and trying to make the construct not tied to integer sequences (because such a specific construct would be out of place in C). The typical for loop, like the one in your comment, has a begin, end and increment parameter, just like the ALGOL example.I assume you mean that you'd prefer some kind of for-each kind of loop, but in order to support that, a language needs a formalized concept of iterators, which may be out of scope for the project.