[Ecls-list] Using Femlisp with ECL / Bug reports

Nicolas Neuss Nicolas.Neuss at iwr.uni-heidelberg.de
Fri Aug 5 11:55:06 UTC 2005


Nicolas Neuss <Nicolas.Neuss at iwr.uni-heidelberg.de> writes:

> Julian Stecklina <der_julian at web.de> writes:
>
>> Is there any reason why this is written so complicated (besides mixing
>> iterating forms with loop end tests)?
>
> Of course the real thing involved some functions not known to a general
> public.  I thought that people would prefer a version they could test
> themselves without porting Femlisp to ECL.

Sorry, I looked again and the answer is more interesting.  The code came
from my testing setup and was

(loop for fsym = (pop *testing*) while fsym
   for result =
        (catch 'trap
          (handler-bind ((error #'(lambda (condition) (throw 'trap condition))))
            (format t "~&~%***** Testing ~A *****~%~%" fsym)
            (funcall fsym)
            nil))
   when result do (push (cons fsym result) *failed*)
   finally (return *failed*))

I rewrote it now as (loop ... (let ((result ...)) ...) ...) which costs one
indentation level.  But I guess that I should indeed use LOOP less often.
The ordering of execution of initialization, stepping, and termination
clauses is quite unintuitive.

Nicolas.





More information about the ecl-devel mailing list