From be904a7d06385f822aecd46d282a896965ca72a7 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 29 Dec 2021 12:23:24 +0530 Subject: Comment on the Common Lisp loop macro. --- topics/lisp/lisp4schemers.gmi | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'topics') diff --git a/topics/lisp/lisp4schemers.gmi b/topics/lisp/lisp4schemers.gmi index 9088092..f0ee1af 100644 --- a/topics/lisp/lisp4schemers.gmi +++ b/topics/lisp/lisp4schemers.gmi @@ -12,6 +12,10 @@ $1 = (0 1 2 3 4 5 6 7 8 9 10 11) ### In Common Lisp +The Common Lisp loop macro is not without its problems. See the paper "Don't Loop, Iterate" linked below. The paper compares different iteration mechanisms and promotes the author's own iterate macro. Personally, I think Scheme's approach with SRFI-1 is much cleaner. Explicit iteration is often distracting. Recursion is often what the programmer really wants. + +=> https://common-lisp.net/project/iterate/doc/Don_0027t-Loop-Iterate.html Don't Loop, Iterate + ``` CL-USER: (loop for i below 12 collect i) -- cgit v1.2.3