4 ms·
I blogged about this: https://blog.reverberate.org/2025/02/10/tail-call-updates.html https://blog.reverberate.org/2025/02/10/tail-call-updates.ht... It uses a
by haberman 2y ago
I blogged about this: https://blog.reverberate.org/2025/02/10/tail-call-updates.html https://blog.reverberate.org/2025/02/10/tail-call-updates.ht...
It uses a technique I published several years ago for writing fast interpreters with tail calls: https://blog.reverberate.org/2021/04/21/musttail-efficient-interpreters.html https://blog.reverberate.org/2021/04/21/musttail-efficient-i...
There is also this tweet from the author: https://x.com/kenjin4096/status/1887935698906529903 https://x.com/kenjin4096/status/1887935698906529903
- hkwerf 2y agoWhile it's not implemented, Rust even has a keyword reserved [1] for musttail, "become": https://github.com/phi-go/rfcs/blob/guaranteed-tco/text/0000-explicit-tail-calls.md https://github.com/phi-go/rfcs/blob/guaranteed-tco/text/0000... [1] https://doc.rust-lang.org/reference/keywords.html https://doc.rust-lang.org/reference/keywords.html
- discardable_dan 2y agoAnd like everything else in Rust, it will forever live in the "unstable" pile of features that are required to use the language without standing on your head (looking at you, pattern matching through boxes).
- oefrha 2y agoFor us non-compiler nerds, can you comment on which compilers support musttail? I suppose latest clang has it. gcc: since you mentioned support was only added in July 2024, I suppose it's not in gcc 14 yet? How about Apple clang from Xcode 16? And MSVC?
- haberman 2y agoI don't closely follow the release schedules for Clang, GCC, etc, so I don't have up-to-date info on that. Unfortunately I'm not aware of any support for musttail in MSVC.
- saidinesh5 2y agoThanks for the article. Funnily enough, the first half of the article made a lot more sense after the second half where i was wondering "wouldn't goto do the same?" And then i remembered it was mentioned in the first half...