‹ BackHN Continuity

Thread

What Zig felt like, coming from Rust

282 points · 351 comments · ksec

  1. hn_submit · · focus · HN ↗
    There will never be a true successor to C since C is "high level assembly." The lack of pointer checking, unsafe casts and non-existent bounds checking aren't an oversight but by design! Assembly doesn't have them so neither does C! There's no reason to whine about it.

    The real problem is that people are using C for the wrong reasons. C is for the development of operating systems and low-level code, not applications.

    Zig is more modern but anything that does even one iota more of hand-holding or has anything that looks like a guardrail fails the test.

    If you want to write applications use Pascal, Java, C#, Swift or Go.

    1. PaulDavisThe1st · · focus · HN ↗
      Is a digital audio workstation or a "AAA" game, with their timing constraints, unbounded computational loads and general demanding performance requirements closer to "an application" or "operating systems and low level code" ?
      1. hn_submit · · focus · HN ↗
        An application since it's not an operating system kernel.
        1. PaulDavisThe1st · · focus · HN ↗
          so you're suggesting that developers of these types of applications are making a mistake by using C++ ?
          1. hn_submit · · focus · HN ↗
            New development in C++ would be a dire mistake, but you can't expect everyone to switchover on a moment's notice.

            C and C++ are a liability for many reasons since memory corruption is notoriously hard to detect, localize and fix. And multi-threading is even harder, almost a dark science to get right.

            For those reasons alone Rust is a no-brainer.

            1. creata · · focus · HN ↗
              Rust has its downsides, too.

              The big one for me is that Rust packages tend to pull in dozens or hundreds of transitive dependencies - C/C++ code tends to be monolithic, so it has fewer maintainers who could become compromised.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.