Re:Maintain It with Zig
by michaelsbradley on Wednesday September 08, 2021 @02:44PM
(#28461386)
I think the maintainers of Nim would disagree with your assessment given that the first sentence on the front page of Nim's official website is:
"Nim is a statically typed compiled systems programming language."
As someone else pointed out, when using Nim with its ARC/ORC and move semantics (which will eventually be the default), it's closer to Rust than to Go.
That being said, Nim's current default GC does well for many kinds of workloads. If it's really causing a performance problem, it's possible to disable it and manage memory manually (or use a different language for the task at hand, of course).
With ARC, Nim's memory management would be closer to Rust than to Go.
Automatic Reference Counting? I’m not sure. Swift spends a lot of its execution time doing reference counting.
Nim does it compile-time to insert destructors in the correct places. (except for cycle collection, which needs a runtime GC)
Are there benchmarks?
While Zig is manual memory managed like C and nearer to the core, but harder to program.