Re: parallel stepping in loop, but what about termination tests?
| Newsgroups | gmane.lisp.clisp.devel |
|---|---|
| Message-ID | <3abc702b612a45c8afa962f3be34884c@HE105658.emea1.cds.t-internal.com> |
Pascal, Thank you for pointing at a missed error in CLISP and another case which will help me make up my mind about the intermingling of stepping and termination tests in LOOP. >>(loop for x across "abc" and for z on (list 1) do (princ x) finally (return (cons x z))) >The first form seems to be a syntax error; other implementations signal it: >Z is an unknown keyword in FOR or AS clause in LOOP. Current LOOP context: > FOR X ACROSS "abc" AND FOR Z ON (LIST 1). Oops. I'll have to check whether CLtL2 allowed my bogus syntax. >One case where it makes a difference is: >$ clall -r '(loop for x across #((1 2 3) (4 5 6) (7 8 9)) and z := nil :then x finally (return (list :x x :z z)))' >CLISP --> (:X (7 8 9) :Z (7 8 9)) >[All other OSS implementations] --> (:X (7 8 9) :Z (4 5 6)) Ugh, room for improvement. I don't like the fact that the final x and z do not stem from The same iteration, even though ANSI-CL LOOP probably can't forbid CLISP's result. Jörg ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ clisp-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-devel