| ▲ | tialaramex 2 hours ago | |||||||
This footgun is the reason I'm so enthusiastic about the Rust `become` keyword. This proposal would give Rust a specific keyword which says that you intend TCO and so two things happen: 1. The compiler goes to more length to deliver TCO even where it wouldn't "just work" and 2. If it cannot deliver TCO your code doesn't compile, because you asked for TCO. | ||||||||
| ▲ | chriswarbo an hour ago | parent | next [-] | |||||||
Sounds similar to @tailrec in Scala I personally use the phrase "tail call elimination" when it's a requirement that can be relied on; and "tail call optimisation" when it might be implementation-dependent, context-dependent, limited (e.g. to immediate self-calls), etc. | ||||||||
| ▲ | StilesCrisis 2 hours ago | parent | prev [-] | |||||||
Sounds like clang::must_tail? | ||||||||
| ||||||||