4/16/2026 at 9:33:51 AM
I recall having a conversation with a friend that was angry at this kind of thing sometimes being called "Tail Call Optimization". It's a guarantee that your program won't literally crash by stack overflow if you recurse too much using tail calls; the fact that it might have performance benefits is secondary in importance. So the name can be a bit misleading.Back then Rust's tail call story looked bad. The problem slipped my mind for years and now I'm suddenly made aware of this become keyword, and it seems like a great idea -- to make the developer's intent more explicit. Getting better target support for this is doing god's work.
As an aside, I would slightly argue against the idea that it's useful only for a narrow set of libraries. It's useful for the developer as a user of the language to be able to express things in either iterative or recursive style without worrying as much whether the latter is going to panic. Maybe if I had to deal with all the work of making such features functional in a language, I would value expressiveness a bit less!
by Anvoker