5 ms·
Let me be a contrary voice since I almost exclusively use LOOP (or ITER) for iteration, mainly because I really don't care what kind of iteration ought to be us
by aerique 9y ago
Let me be a contrary voice since I almost exclusively use LOOP (or ITER) for iteration, mainly because I really don't care what kind of iteration ought to be used[1]. I just want to iterate over elements in a data structure.
If later it needs optimization I'll give it a better look. (I've rarely needed to do this.)
I like my iterations to look the same so the source as a whole will be easier to grasp (for me and someone else).
Then again, you're Scott Burson and I'm just an anonymous Lisper so the parent should definitely give your opinion more weight.
[1] And DO has always looked ready unclear to me.
- ScottBurson 9y agoI don't use ITERATE, but that's more because I haven't felt the need than because I dislike it; it looks much better designed to me than LOOP. Maybe I should give it a try. As for giving my opinion weight, it's definitely a minority opinion among CLers, but I think we're a significant minority; I don't think I'm the only one. DO seems a little complicated at first, it's true, but once you understand it, the parts all fit together neatly. The only thing I wish had been done differently is the sense of the exit test -- currently it acts like "until" (the loop is exited when the test form evaluates to true), but the consensus of modern programming languages is that "while" behavior (exiting when the test is false) is more natural.