Hasty Briefsbeta

Bilingual

Rust should have stable tail calls

a day ago
  • #Tail Calls
  • #Systems Programming
  • #Rust
  • Rust should have stable tail calls to enable recursion without stack overflow and efficient code generation.
  • Tail calls allow reusing the caller's stack frame and are useful for state machines like interpreters and parsers.
  • Current issues include lacking backend support in LLVM across different targets, especially WebAssembly and PowerPC.
  • An alternative to tail calls is computed goto, which may be more portable and efficient for some use cases.
  • The plan is to work on tail calls for extern "Rust" first, with a goal of stabilization by 2027, requiring funding.