←back to thread

135 points barddoo | 1 comments | | HN request time: 0.198s | 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 #
justinhj ◴[] No.45309688[source]
Zig is all about making things explicit. Destructors are hidden code. I presume there will be an application level tracking of lifetime.
replies(1): >>45310538 #
1. ◴[] No.45310538[source]