Comment by ludston

2 hours ago

Worse: Using recursion in Common Lisp isn't idiomatic, given that CL doesn't guarantee tail-call optimisation in the specification.

Sigh. This again.

All major Common Lisps support tail call optimization with proper declarations, with the exception of ABCL because it runs on the JVM.

And those declarations are all identical or almost identical, so it's easy to write an implementation-specific macro to guarantee TCO if you need to do so.

Some algorithms are easiest to express and read with looping constructs. For those algorithms, use looping constructs. Other algorithms are easiest to express and read with recursion. For those, use recursion. You shouldn't be afraid of recursion just because ANSI doesn't say it's guaranteed. You should be afraid of it if your code needs to run on ABCL, but otherwise, recur on.