Re:Things you can’t do in Rust: tail recursion
by stmw on Friday December 01, 2017 @02:04PM
(#15826342)
Ah, thanks, makes good sense. I think of "write a new experimental functional language and reuse part of the Rust compiler" as somewhat "academic", but matter of taste. But for production parsers, I think I'd try to avoid using the stack or limit the stack, anyway.
If you wanted to, for example, write a new experimental functional language and reuse part of the Rust compiler to sanity check and generate the executable, then tail-recursion would be really important.
Similarly, if you create something like a parser generator and don't have tail recursion optimization, then you are going to run out of stack space before being able to parse stuff. So, there are lots of practical applications that depend on this feature too.