←back to thread

122 points barddoo | 1 comments | | HN request time: 0.197s | source

Writing Redis from scratch in Zig.
Show context
maleldil ◴[] No.45309397[source]
From the README:

> Memory safety with RAII patterns

I'm curious to see how they achieve RAII in Zig, which doesn't have destructors. If they mean defer + deinit methods, that's not the same thing.

replies(2): >>45309688 #>>45310719 #
1. teo_zero ◴[] No.45310719[source]
> If they mean defer + deinit methods, that's not the same thing.

No? It's the first thing that came to my mind when I've read RAII.