[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Loop Macro



During the recent discussions of loop macros there has been some
mention of the ``English-like'' syntax problem. I wonder to what extent
this is being tangled up with the issue of whitespace parsing.
Recall the language KRL (Bobrow and Winograd) in which whitespace
was considered by the reader. The idea was that if a line
was underneath andother and indented to the right, it was subordinate or
a sublist of the previous line. The examples of the Loop macro I've
seen on this mailing list seem to emphasize this:

(loop for a from start to end by 5
      for b in list
      do (do-something a b)
      until (null b))

This indentation immediately suggests:

(loop (for a from start to end by 5)
      (for b in list)
      (do (do-something a b))
      (until (null b)))

while this suggests lunacy (?):

(loop for a from start to end
      by 5 for b
      in list do (do-something a b)
      until (null b))

			-rpg-