4 ms·
Didn't know about Lua[1], thanks! Although I think I would prefer an explicit syntax, like Tcl's “tailcall”[2], Perl's “goto &sub”[3], or “become”[4], with the
by ainar-g 8y ago
Didn't know about Lua[1], thanks! Although I think I would prefer an explicit
syntax, like Tcl's “tailcall”[2], Perl's “goto &sub”[3], or “become”[4], with
the compiler checking that this is actually a tail-call.
[1]: https://www.lua.org/pil/6.3.html https://www.lua.org/pil/6.3.html
[2]: https://wiki.tcl-lang.org/page/tailcall https://wiki.tcl-lang.org/page/tailcall
[3]: https://perldoc.perl.org/functions/goto.html https://perldoc.perl.org/functions/goto.html
[4]: Which was used in a C-family language I can't remember.
- steveklabnik 8y ago("become" is reserved in Rust for this exact possible future, maybe that's what you're thinking of.)