[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
loop macro
Dan,
First, you are right that my strong negative feelings were inspired by
the current LOOP stuff -- a fair amount of experience trying to read
loopy code and a very modest experience trying to write things in it. I
believe that the problem is a direct consequence of the cute
English-like syntax, but I'll try to keep an open mind in considering
anything new that you folks come up with. It's not inconceivable that
the real problems lie elsewhere. Of course, I can't speak for the
millions of other loop-haters in the world.
Second, I think that you misunderstood what I was suggesting as a remedy
for LOOP. While I don't remember Bawden's old DOO thing, I was not
suggesting that we flush all keywords and let levels of parentheses do
all the work. The existing DO construct goes just about as far in this
direction as it is wise to go, plus a bit. What I was advocating is
something very much like the sort of thing that Alan Snyder and Gregor
have just suggested, or like the package from PSL that was discussed
on the iteration list some time ago. (I'm not sure whether the H-P
proposal is the same as this.)
Just as I have no problem with the use of function names like When, I
have no problem with an iteration construct that uses mnemonic
English-like names or keywords to INTRODUCE various clauses. My problem
is with the English-like syntax, not with English-like vocabulary. If a
clause like Collect or Sum has arguments or some sort of body, Lisp
provides a perfectly good method for delimiting such a clause:
parentheses. To use little "glue" words like "from" and "until" to
stick such clauses together in this one part of the language and nowhere
else is what I object to. And since the syntax of this English-like
stuff is much more restricted than real English is, I find it very hard
to remember which little words are going to stick which arguments to
which operators. Yes, sometimes you can "read" loopy code aloud and it
says just what it is going to do, but other times the best code is not
the code that proudces the best approximation to grammatical English
when read as a sentence.
-- Scott
- Follow-Ups:
- loop macro
- From: Daniel L. Weinreb <DLW@SCRC-QUABBIN.ARPA>