zig VS Nim

Compare zig vs Nim and see what are their differences.

zig

General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software. (by ziglang)

Nim

Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority). (by nim-lang)
Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • Scout APM - Truly a developer’s best friend
  • talent.io - Download talent.io’s Tech Salary Report
zig Nim
504 235
17,802 13,594
7.9% 2.0%
10.0 9.8
3 days ago 4 days ago
Zig Nim
MIT License GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

zig

Posts with mentions or reviews of zig. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-09-29.
  • 6 lessons from a technical founder
    3 projects | dev.to | 29 Sep 2022
    I had completed a functional programming course a few months prior and I was hyped for writing functional code with anything other than Lisp. I was in the mood for learning a new language at the time and the only "project" I had in mind was Savoir. To tell you how deep I went in my search for a “new shiny tool to use”, the other languages I was considering were Zig and Crystal.
  • Introduction a Bun.sh
    3 projects | dev.to | 27 Sep 2022
  • I love Python, but I ought to branch out. I've done some stuff in C# and Java, but never as much as I've done in Python.
    2 projects | reddit.com/r/ProgrammerHumor | 21 Sep 2022
    I really don't know either - I am a JS guy, but after reading some of the examples on ziglang.org, I am tempted to to try it out as a backend api tool.
  • CppCon 2022
    9 projects | news.ycombinator.com | 17 Sep 2022
    ADL is, saddening.

    I want a language with the pragmatism of C++ rather than the "mutability excludes aliasing, no lifetime errors allowed, at the cost of usability, and no defined unsafe pointer semantics so far" unfinished experiment of Rust, with better sum type syntax than std::variant, and eliminating C++ footguns luke {implicit constructor, mixed-sign integer comparison, silently overriding virtual methods, C-style casts of multiple inheritance pointers is UB...}. Perhaps Cppfront holds promise, possibly Carbon or Jakt, maybe Zig though it lacks RAII when convenient and its return value semantics (much like Carbon's) is a footgun: https://github.com/ziglang/zig/issues/5973.

  • Linus Torvalds: Rust may make it into the next Linux kernel after all
    6 projects | reddit.com/r/rust | 15 Sep 2022
    comptime is its superpower. That leads to proper modules as values, entirely dispenses with macros, etc. etc. etc. It's ultimately just a vast improvement on every single aspect of C AFAICT. See https://ziglang.org/
  • Zig VP of community comments on Rust
    5 projects | news.ycombinator.com | 10 Sep 2022
    > https://github.com/ziglang/zig/issues/12040

    This one is quite funny. Normally you'd use `if (a) ... else |b| ...` if the type of a was an error union, and you'd only get to the `else` branch if it was an error rather than the non-error type, so I suspect that there's a coercion from bool to some error union here.

    5 projects | news.ycombinator.com | 10 Sep 2022
    I am only moderately surprised by this, because I have seen some less egrigious intermittent miscompilations in stage1 such as this one: https://github.com/ziglang/zig/issues/11786

    I cannot provide the full program in which it fails, and the small programs I tried did not cause it to fail.

    I sort of expect these things to be fixed though. Like, eventually both Zig and unsafe Rust will actually have defined semantics, and eventually expressions containing `if (false) { X(); }` will not call X, and so on.

    5 projects | news.ycombinator.com | 10 Sep 2022
    It's a known issue, idk, look it up in the github issues. https://github.com/ziglang/zig/issues/3882 is related but not quite the same thing.
  • Hacked std.PriorityQueue for constant time update
    2 projects | reddit.com/r/Zig | 7 Sep 2022
  • Zig, the Small Language
    13 projects | news.ycombinator.com | 7 Sep 2022
    I tried Zig recently but I found the unsilenceable lints to be a huge productivity killer. I actually posted a link to the GitHub issue this morning. https://news.ycombinator.com/item?id=32751317

    This makes a normal workflow with `watchexec zig test` basically impossible since before I can even run the tests I have to spend time hunting down which variables are used/unused at the moment and (un)commenting them. And it seems like they're planning to double down on this by making you adjust even more trivial things like public/private and var/const before it will even compile your code. https://github.com/ziglang/zig/issues/335 https://github.com/ziglang/zig/issues/224

    Maybe I'm a bad developer, but my code is never perfect the first time around. I always spend time experimenting and refining my designs. I want to find a design that works, and only then spend time polishing and prettifying before I git push.

    I do understand the reasoning (they don't want people committing poor quality code), but this implementation just seems completely backwards to me. It breaks the natural order. It's like saying we won't let you ctrl+s until your tests pass to make sure you don't commit poor quality code. Stop nannying me and just let me get my work done!

Nim

Posts with mentions or reviews of Nim. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-09-25.

What are some alternatives?

When comparing zig and Nim you can also consider the following projects:

Odin - Odin Programming Language

v - Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io

rust - Empowering everyone to build reliable and efficient software.

rust - Rust for the xtensa architecture. Built in targets for the ESP32 and ESP8266

go - The Go programming language

crystal - The Crystal Programming Language

TinyGo - Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.

haxe - Haxe - The Cross-Platform Toolkit