3 ms·
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 manu
by iopq 10y ago
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.
- flubert 10y ago>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.
- iopq 10y agoEven 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.