2 ms·
> TCO interacts badly with many Lisp language features: dynamic binding, unwind-protect, ... I've never understood this claim. I mean, I understand the techni
by ScottBurson 12y ago
> TCO interacts badly with many Lisp language features: dynamic binding, unwind-protect, ...
I've never understood this claim. I mean, I understand the technical point: that use of dynamic binding or UNWIND-PROTECT creates a barrier in the stack across which TCO cannot be done. But in practice it seems to me a non-issue. I can't recall ever, in 35 years of Lisp hacking, wanting to write a tail-recursive routine that used one of them on each iteration, in such a way as to cause unbounded stack growth. It just doesn't happen, at least not to me.
Maybe that's partly because I try to keep my usage of dynamic binding to a bare minimum. I think some people overuse it.