3 ms·
Counting on TCO is more of a Scheme thing (where the language spec guarantees it) than a Common Lisp thing. CL does not guarantee TCO so, at least historically,
by Jtsummers 1y ago
Counting on TCO is more of a Scheme thing (where the language spec guarantees it) than a Common Lisp thing. CL does not guarantee TCO so, at least historically, looping (various forms, not just the LOOP facility) was quite common.
- cryptonector 1y agoAs u/dapperdrake points out just below one can use code-walking macros to rewrite recursion into iteration, and Doug Hoyte shows how to do that (specifically for named-let) in Let Over Lambda, thus allowing the illusion of TCO. But IMO just about every language ought to have TCO.