3 ms·
Interesting piece. Among other things, the origin of Common Lisp's infamous, love-it-or-hate-it LOOP macro is unmistakable here: # loop in 'for' mode for i
by gruseom 17y ago
Interesting piece. Among other things, the origin of Common Lisp's infamous, love-it-or-hate-it LOOP macro is unmistakable here:
# loop in 'for' mode
for i from 1 to 10 do print(i) od
# ...and in 'while' mode
while i < 10 do print(i); i := i + 1; od
# ...and in both!
for i from 1 to 10 while checkWhetherCancelled() do print(i) od
# ...just loop, no counter!
to 10 do print("Ten times!") od
Personally, I love LOOP; it's just so damn flexible and intuitive, even if there is something a little illicit about it. But no question it's as un-Lispy as you can get. How fitting that it turns out to have been embedded Algol all along.