I have been reading about this new language for a while. It's a C competitor, very slim language with very interesting choices, like supporting cross platform compilation out of the box, supports compiling C/C++ code (and can be used as a drop in replacement for C) to the point in can be used as replacement of (c)make and executables are very small.

But, like all languages, adoption is what makes the difference. And we don't know how it goes.

Is anyone actually using Zig right now? Any thoughts?

  • Vorpal@programming.dev
    ·
    1 year ago

    I really don't see what niche it is trying to fill that isn't already occupied.

    Rust is as successful as it is because it found a previously unoccupied niche: safe systems programming without garbage collector and with high level abstractions that (mostly) optimise away.

    I don't think "better C" is a big enough niche to be of interest to enough people for it to gain a critical mass. I certainly have very little interest in it myself.

    • jeffhykin@lemm.ee
      ·
      1 year ago

      The killer feature (IMO) is automatic conversion of C code to Zig code (transpiling). E.g. take a C project, convert it all to Zig, and even if you don't transpile, you still get really nice compat (include C headers just like a normal input without converting). Getting a medium sized C project converted to Zig in 1 day or 1 week, then incrementally improving from there, is really enticing IMO especially considering the alternative of rewriting in Rust could be months of very hard conversion work. Transpiling isn't perfect but it seems to be a 97% soltuion.

      The second advantage seems to be easy unsafe work.

      BTW I don't really use Zig, and I still prefer Rust, but those are the reasons I think it has a niche of its own. Does rust already fill this space? Yeah kinda, but that's why I'd call in a niche

    • philm@programming.dev
      ·
      1 year ago

      Yeah my thinking as well.

      Addtionally, why I think other system language competitors like Zig or Nim aren't succeeding long-term, is because of fast growth and already big ecosystem of Rust. Zig may be better though for some use-cases (when you want to avoid all the mental overhead, and the application stays simple).