Replies: 1 comment
-
There are library that allows using tail recursion with macro, I forgot which one. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Given that the Rust compiler does not current implement tail-call optimization, I think it would make sense to include non-tail recursion as an antipattern. Would folks agree?
Would it also make sense that, instead of rolling one's own tail-recursive functions, that we recommend the use of the
fold
method, which uses tail recursion?Beta Was this translation helpful? Give feedback.
All reactions