‹ 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. davemp · · focus · HN ↗
      Have you written anything low level in Zig? If anything, Zig is lower level than C.

      A lot of the “high level assembly” parts of C are actually compiler extensions and not from the C spec.

      libc is even worse.

      1. hn_submit · · focus · HN ↗
        C wasn't meant to fully replace low-level languages like Assembly. Context switching still isn't possible in C (nor in Zig).

        And most C library calls are actually Unix system calls. Malloc() is an operating system call and not a library call. Yes, they made it a library call later on to facilitate usage in other operating systems but it was originally an integral part of the Unix OS.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.