All guides
Every guide, newest first. Browse by topic instead, or read the daily tips and puzzles.
-
Return errors as values with std::expected C++
std::expected
carries either a value or an error, so error paths stay visible in the type instead of hiding in exceptions or out-parameters. transform maps the value and passes errors through untouched. -
Rust Lazy Statics, Measured: OnceLock vs LazyLock vs lazy_static — and the 2x Claim That Does Not Reproduce Rust
Three ways to build a lazy static in Rust, measured: steady-state access and contended first init. OnceLock is 1.24x faster than lazy_static, not 2x.