Skip to content

Pointer Stability for ArrayLists (In Zig)

ziglang.org
3 pointsanitil1 comment
On HN

Comments

I just came across an interesting update for Zig, in the direction of supporting a certain class of memory safety. I haven't seen this exact approach before, it seems to be like a limited version of 'const-ability' where you can lock the backing pointers in an ArrayList over a window.

With the addition of 'defer' on the unlock seems not too difficult to use, but I think the main issue I would find it having to remember when and when not to use it.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.