Re: Ugly loop



Pascal Costanza <pc@xxxxxxxxx> writes:

> LOOP can lead to very compact and very easily understandable code. I
> don't care about the dark corners of LOOP, because I can just avoid
> them. There are cases when I switch to recursive versions of an
> iteration when LOOP loses its steam, but this rarely happens. (And I
> still have to learn ITERATE which seems to solve many problems that
> LOOP has.)

I tend to move things to DO-clauses when the conditionals get too
complicated, since complex IF-THEN-ELSE clauses in LOOP IMHO easily
can get unreadble (I recently uttered som loop-scepticism here because
after a bad debugging experience due to complex conditionals).

But IMHO the main shortcoming of loop is that it isn't complete
enough. For instance, LOOP would be even more fun if it had general
sequence accumulation and not only list and number accumulation - I'm
tired of writing e.g. (coerce (loop ... collect ...) 'string)!

> [1] A programming language is a human-computer interface, with the
> central idea that it should be designed for the human to be able to
> better express ideas.

Well, the "provable programs" or even "programs that prove their own
correctness" discipline has had a large impact on many computer
science departments. The mathematical logician in me is somewhat
attracted to those ideas - the hacker in me detests them. Common Lisp
is a good blend of precision, high quality standards and pragmatism,
i.e. just what the dual-natured logician-hacker needs :-)
--
(espen)
.



Relevant Pages

  • Re: Ugly loop
    ... > Espen Vestre wrote: ... LOOP would be even more fun if it had general ... >> sequence accumulation and not only list and number accumulation - I'm ... the main shortcoming of LOOP (and the way ...
    (comp.lang.lisp)
  • Re: Ugly loop
    ... > Espen Vestre wrote: ... LOOP would be even more fun if it had general ... >> sequence accumulation and not only list and number accumulation - I'm ... the main shortcoming of LOOP (and the way ...
    (comp.lang.lisp)