Comment

Comment by zamalek

From the file:

>Create with P::new(value). p.get() returns &'static T. [...] unless an explicit recycling site proves them dead

It's unsound, the LLM/human is doing the proving. They've hidden unsafe in an abstraction without removing the unsafeness. Using the arena allocator's lifetime would have been safe and easy (bumpalo recommends this AFAIK).

I'm guessing a sycophantic LLM either found or praised this load-bearing seam.

Never deallocating would have been sound (missile memory management: https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98... ).

parent zamalek 11 days ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton