It's rare to actually use tail-recursive algorithms in Rust since those can be written with a loop, which Rust does support.
I mean, it's rare to actually manually recurse in Haskell too, and when you need to, it's often not something you can write tail-recursively.
>it's rare to actually manually recurse in Haskell
I wonder if there is a semi-easy way to measure this. My impression was that while the papers and tutorials are all about combinators, the people writing Haskell "in the wild" tend to go with general recursion more often than you might expect.
Even if you recurse, it doesn't mean you can make it tail-recursive. It might be a style issue, but Rust programmers are just going to use combinators instead anyway since recursion is slower.
Re:Ask HN: How do I understand Rust?
by steveklabnik on Friday January 27, 2017 @10:19PM
(#13504685)
It's not guaranteed, though LLVM may do it if it feels like it. We may gain guaranteed TCO in the future, we'll see.
Proper tail recursion was still missing last time I checked. Does it affect functional programming in Rust?