Type-level Bounded Recursion in Rust

9 points by calvin


matklad

Even backtrace-on-stack-overflow, which does what the name implies, aborts immediately after printing the backtrace and comes with a note saying that it’s “unsuited for being enabled in production”.

While unwinding the stack on stack overflow (calling drops, etc) is indeed tricky to get right, I do think that printing a backtrace can be done relatively painlessly, and I strongly wish that Rust’s stack overflow handler did print backtrace by default. I wasted a lot of time chasing stack overflows!

olliej

Ha! “Our macro implementation means we can’t take generic parameters”

C++ already has this! Score 1 for c++ :D