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

Re: 2nd generation LOOP macro



Let me proffer a reason why LOOP should be even *white* pages.
Despite the best efforts of some functional programming people (especially
PROLOG?) iterative constructs won't go away; e.g. too often the translation of
a somewhat simple loop into functional equations leads to indecipherable
code.  Thus it would be well to standardize on some loop facility, if in
fact a standard can be found.

InterLisp's iterative statement facility *does not* share all the crocks of
CLISP (and was no doubt put there rather than being a macro due to
the primitive treatment of macros).  Furthermore, it's years of existence
as a standard within InterLisp, and its easy extensibility, speak well for it.
Both the past and current LOOP proposals are very very much like the
InterLisp iterative constructs, and should be viewed as having years of
support behind their basic ideas.

Another winning idea from the InterLisp iterative statement is that
the prettyprinter treats them specially, and tries to do a "good" job of
formatting so that the constituent parts stand out 2-dimensionally.  A real
defect of DO loops is that almost all minor exceptions to the simple case
have to appear in the code in some place that obscures their nature
(e.g., in the code body, or actually *before* the DO loop, or in the return
clause);  I realize that doing a "good" job will cause months of seemingly
endless discussion, but fruitage of this idea has got to be worth the effort.