←back to thread

135 points barddoo | 1 comments | | HN request time: 0s | source

Writing Redis from scratch in Zig.
Show context
tcfhgj ◴[] No.45308065[source]
So riiR is now riiZ? ;)
replies(1): >>45308745 #
nine_k ◴[] No.45308745[source]
"Rewrite it away from C (or C++)". Whether you choose Rust, Zig, Ada, D, Nim, even Pascal, it's likely going to become more secure. It will be supported on fewer platforms though, but still should run fine under Linux, macOS, Windows, *BSD, on x64, Arm64, and likely RISC-V, too.
replies(1): >>45309389 #
maleldil ◴[] No.45309389[source]
Zig isn't memory safe, though. It's safer than C or C++, but not much.
replies(2): >>45309760 #>>45309844 #
throwawaymaths ◴[] No.45309844[source]
checked array bounds is memory safety.
replies(1): >>45311001 #
1. lyu07282 ◴[] No.45311001[source]
Runtime bounds checking, but only in Debug/ReleaseSafe builds, besides there are many other types of memory safety issues left unaddressed.