How Tail Call Optimization Works
There&#x27;s a funny interaction between TCO and memory management. If you have scoped destructors (C++, Rust) then you might accidentally defeat TCO by simply declaring a variable. GCs solve this problem by deferring collection to allocation points, but now TCO requires GC.<p>What&#x27;s the modern view here? I think it&#x27;s bimodal: either TCO is a defining feature of the language, or a best-effort optimization that nobody should rely on.