Re: A style question



job-271842874@xxxxxxxxxxxxxx wrote:

1) In "ANSI Common Lisp", Graham makes the following comments:
"The loop macro was originally designed to help inexperienced Lisp
users write iterative code...Unfortunately, loop is more like English
than its designers ever intended...to understand it in the abstract is
almost impossible...For such reasons, the use of loop cannot be
recommended."

I don't agree. You can learn the basics by reading loop examples. Once you
know how each loop word works, all you need is the BNF, if you forgot
something. The more you use it, the more you learn the grammar and the
easier it is to use it. Like all good DSLs, it helps a lot to write short
and easy to understand code for the task for which it is designed:
iterating.

--
Frank Buss, fb@xxxxxxxxxxxxx
http://www.frank-buss.de, http://www.it4-systems.de
.



Relevant Pages

  • Re: A style question
    ... | "The loop macro was originally designed to help inexperienced Lisp ... | than its designers ever intended...to understand it in the abstract is ... Gain experience with Common Lisp; ... mind mate, n. ...
    (comp.lang.lisp)
  • Re: Ugly loop
    ... "The loop macro was originally designed to help inexperienced Lisp users ... its designers ever intended: you can use it in simple cases without ...
    (comp.lang.lisp)
  • Re: lambda closure question
    ... > What I want to do is pre-load functions with arguments by iterating ... setattr(myclass, item, lamdba self: func(self, item)) ... And that's the correct explanation, ... > reference will always get modified as the loop iterates. ...
    (comp.lang.python)
  • Re: Iterate through member variables of a class
    ... I did that because the OP was asking about iterating through member ... variables of a class by using a while loop. ... you can add or remove elements from the array and the ... So it would be better if I declared the int as a size_t instead? ...
    (comp.lang.cpp)
  • Re: looping questions
    ... this is not a perl problem. ... what is wrong with my IF loop? ... You don't want to use scalar glob here. ... iterating over that result. ...
    (comp.lang.perl.misc)