Re:Zap – Blazingly fast backends in Zig
by littlestymaar on Wednesday June 14, 2023 @05:54PM
(#36333295)
Zig isn't memory-safe, and you're not going to pay for the development overhead of manual memory management if you're doing regular back-end stuff.
[ Parent
| on HN ]
People did for decades and a lot of that "regular back-end stuff" is in C++ at the moment. If you wanted to move it to a different language, you might currently choose to move it bit-by-bit to Go. But you could also move it bit-by-bit to Zig, and it wouldn't be an unreasonable choice. Zig is in that sense an alternative to Go, IMO.
Re:Zap – Blazingly fast backends in Zig
by littlestymaar on Thursday June 15, 2023 @03:05AM
(#36337317)
> People did for decades
Yes, but it was before the invention of mobile phone… Since Java came out, the majority of back-end has been written in memory-safe language, for good reasons.
> you might currently choose to move it bit-by-bit to Go
Not even Google, the home of Go, has been doing a C++ to Go conversion. Backend services that are still in C++ in 2023 are probably so for good reasons, most likely because they either have:
1. really high performance requirements, hence no Go.
2. low budget, and are mostly maintained as it is, hence no rewrite.
In any case, those are only a fraction of the total backend code, which is mostly PHP, Java, and Nodejs.