Re:Rust will likely not support tail call optimization
by anonymous on Thursday April 11, 2013 @02:21AM
(#5530279)
Then how can GCC and clang do TCE in C programs?
[ Parent
| on HN ]
Re:Rust will likely not support tail call optimization
by aidenn0 on Thursday April 11, 2013 @03:24AM
(#5530452)
1) They can't do it all the time
2) Some of the times they can do it, they do it when they control both the caller and the callee. In that case you can violate the ABI to your heart's content.
3) I don't really see TCE as an issue in Rust, since they seem to be going the RAII route and, as others have commented, RAII and TCE don't play well together (for the same reason a call at the end of a dynamic binding can't be TCE'd in common-lisp).