‹ BackHN Continuity

Thread

What Zig felt like, coming from Rust

282 points · 351 comments · ksec

  1. plqbfbv · · focus · HN ↗
    Maybe I'm not that deep into programming, but I don't understand the hype about Zig?

    I programmed in rust a bit and can't say I'm an expert, but in my view rust mostly-solved the memory management problem at compile time and without a GC, and it works very well. The biggest con and cost I've always seen repeated so far is that "it's slow to compile", and I get that, if you're past 250 crates the final --release link tends to become noticeable, but there were improvements to incremental compilation.

    On the other hand - looking at the syntax from this post - Zig feels a blend of javascript, python and golang syntax that still requires memory management. So a nicer-written C that inherits all the issues from C? From the post: no functional programming, data mutation, memory leak, double-free, memory corruption.

    Personally I'd rather trade a couple minutes of final link every time when this is the other option.

    1. slopinthebag · · focus · HN ↗
      yeah to me zig exists as a counter-reaction to rust. which means avoiding both the good and bad things rust does. and rust does a lot of things right, so...
      1. IncreasePosts · · focus · HN ↗
        Rust is for devs who think "if only c++ had a few more features, it would be perfect". Zig is for devs who think "if only C had fewer features, it would be perfect"
        1. slopinthebag · · focus · HN ↗
          ironically rust has fewer features than c++ and zig has more than c
          1. a96 · · focus · HN ↗
            Everything has less features than c++. There's probably no spec that's more bloated with all the (unimplemented) junk that has been piled onto it.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.