News for hackers. Stuff that matters.
Re:Handles Are the Better Pointers by Animats on Wednesday June 21, 2023 @04:43PM (#36424142)
"it bypasses the borrow checker since an index isn’t a reference"

That's a bug, not a feature. The two times I've had go to looking for a bug in the lower levels of Rend3/WGPU (which are 3D graphics libraries), they've involved some index table being corrupted. That's the only time I've needed a debugger.

Re:Handles Are the Better Pointers by slashdev on Thursday June 22, 2023 @08:18AM (#36430988)
Lifetimes are managed at runtime, somewhat like Arc, just without the ref counts. If implemented well you get an assertion if you misuse a reference (eg use after free.)

I’m fine with the trade off, but yes, it can be a source of difficult bugs.