News for hackers. Stuff that matters.
Re:Maintain It with Zig by habibur on Wednesday September 08, 2021 @12:57PM (#28459828)
Nim is garbage collected, thus is a higher level language but doesn't fit the high performance low overhead of "systems programming" requirement.

While Zig is manual memory managed like C and nearer to the core, but harder to program.

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).

Re:Maintain It with Zig by sa1 on Wednesday September 08, 2021 @01:31PM (#28460354)
With ARC, Nim's memory management would be closer to Rust than to Go.
Re:Maintain It with Zig by vips7L on Wednesday September 08, 2021 @07:14PM (#28464226)
Automatic Reference Counting? I’m not sure. Swift spends a lot of its execution time doing reference counting.
Re:Maintain It with Zig by sa1 on Wednesday September 08, 2021 @11:00PM (#28465731)
Nim does it compile-time to insert destructors in the correct places. (except for cycle collection, which needs a runtime GC)
Re:Maintain It with Zig by vips7L on Thursday September 09, 2021 @08:53AM (#28469124)
Are there benchmarks?
Re:Maintain It with Zig by goodpoint on Wednesday September 08, 2021 @02:46PM (#28461413)
Not at all: Nim always targeted system programming. Even before the new ARC/ORC, the GC was optional and done independently in each thread.