Andrew Kelley quit his job in 2018 to build a programming language. Eight years later, Zig powers Ghostty, TigerBeetle and Uber’s cross-compilation. It’s top 5 most admired on Stack Overflow. There’s just one thing missing: 1.0. Andrew Kelley explains why.

Vitaly talked to Andrew about:

  • Why Zig has no 1.0 after a decade, and why that’s deliberate
  • Why Zig left GitHub
  • Why Zig banned AI from Zig
  • What makes Zig better than C (and why every other C replacement failed)
  • Andrew’s take on Open Source

It’s a long interview, but I found it very interesting and worth it.

  • TehPers@beehaw.org
    link
    fedilink
    English
    arrow-up
    6
    ·
    7 days ago

    Especially after the supposed answer to Bun’s memory bugs was “just never dynamically allocate”.

    The answer to Bun’s memory bugs was to follow a style guide. Not allocating dynamically stems from the style guide used by a mission-critical financial transactions database. Bun didn’t have to use that style guide, and honestly it would have been overkill. They could have easily adopted a different one, modified one to suit their needs, or made their own.

    In general, I agree that Rust does a far better job at preventing these kinds of bugs than a style guide does, but Bun didn’t even try one and decided instead to ask Claude to rewrite it in Rust.

    • FizzyOrange@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      6 days ago

      To be honest I don’t see how a “style guide” is going to help. C++ has had all sorts of guidelines and style guides for decades and it helps a bit but… not really.

      What does the Zig compiler’s own style guide say about avoiding memory errors? As far as I can see nothing?

      Bun didn’t even try one

      Is this style guide not a style guide?

      • TehPers@beehaw.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 days ago

        To be honest I don’t see how a “style guide” is going to help. C++ has had all sorts of guidelines and style guides for decades and it helps a bit but… not really.

        It does help though without requiring a complete rewrite in another language, which is prone to causing entirely new issues and reintroducing old, fixed ones.

        Like I said, Rust does a much better job at avoiding these. “Claude rewrite this in Rust” doesn’t give you those benefits for free.

        Is this style guide not a style guide?

        It’s a start, but doesn’t say much about methods to avoid the memory issues that they supposedly had issues with. If they intended to actually use it, maybe it’d have more than 7 commits from 8 months ago. Maybe they would have updated it with patterns to prevent new bugs in the future based on the bugs they ran into. That didn’t happen, though.

        • FizzyOrange@programming.dev
          link
          fedilink
          arrow-up
          2
          ·
          6 days ago

          Well it seems a bit hollow for the Zig developers to say “there’s no problem - just use a style guide!” when they themselves don’t even use one and the only one they can point to just says “never dynamically allocate”.

          • TehPers@beehaw.org
            link
            fedilink
            English
            arrow-up
            1
            ·
            6 days ago

            Bun specifically called out TigerStyle. Given that they were responding to this article, it’s not a surprise they defended TigerBeetle.

            All it takes is one internet search with the words “zig style guide” to find countless examples to pull from online. The Bun devs are entirely to blame for choosing not to create or follow one, and that decision, if I had to guess, stems from their refusal to do any actual software development themselves and instead rely on LLMs to do everything for them.

            Maybe they could have asked robobun to open a PR to add a style guide?

            • FizzyOrange@programming.dev
              link
              fedilink
              arrow-up
              1
              ·
              4 days ago

              All it takes is one internet search with the words “zig style guide” to find countless examples to pull from online.

              “Countless”? You should be able to find, say three style guides that talk about how to prevent memory errors then right? Because my one search didn’t find any.