News for hackers. Stuff that matters.
Re:Rust will likely not support tail call optimization by derefr on Wednesday April 10, 2013 @10:14PM (#5529543)
> 1. deterministic destructors that run at the end of functions (therefore making things that look like tail calls not actually tail calls) and

Couldn't owned boxes (~) passed through the jump transfer their ownership to the next frame (so they'll be destructed by whoever finally does return), and everything else just get destructed before the jump?

Re:Rust will likely not support tail call optimization by pcwalton on Thursday April 11, 2013 @01:22AM (#5530118)
Yeah, we discussed the possibility of doing this. But we eventually decided that it wasn't worth it due to these issues:

* It's surprising behavior for destructors, which can have side effects. C++/D RAII and try/finally in other languages never behave like this.

* You can do it yourself, by moving the values-to-be-destructed into the bit bucket with "let _ = ...";

* You still have the ABI issues in that you can't use cdecl and have to use Pascal/stdcall to get TCO.