TIL about the box.leak() method in Rust: https://doc.rust-lang.org/std/boxed/struct.Box.html#method.leak
This leaks the box, but it also gives you a reference that can live longer! E.g. you can leak a Box<u64> and treat it as 'static.
It makes sense, but being able to use a value after leaking is new idea to me.
miniblog.
Related Posts
Rust and RISC-V both feel like they've reached critical mass and I'd guess that they'll be used more in 5 years than they are today.
What other technologies fit this description?
Some excellent safety improvements in C++26: hardening the standard library against out-of-bounds bugs, and a safer semantics for uninitialised local variables:
LLMs have been really helpful for me porting some JS projects to TS.
Since the types are erased and annotations are optional, I can go gradually and safely with more minimal human oversight.
(I'm not sure if it'll significantly help robustness, but it's lovely for navigation.)