News for hackers. Stuff that matters.
Re:Garbage Collection Without Unsafe Code by veddan on Wednesday April 22, 2026 @04:55AM (#47860918)
I think it should be possible to get rid of the Option tag without introducing any unsafe code by changing index in Gc from u32 to std::num::NonZero<u32>.
Re:Garbage Collection Without Unsafe Code by jagged-chisel on Wednesday April 22, 2026 @08:03AM (#47862383)
An index of 0 is valid if the collection has any content. This doesn’t solve an out-of-bounds issue with the index (i.e. an index that’s too high)